Re: ADO and MetaData
- From: "Vitali Kalinin" <vitkalinin@xxxxxxxxx>
- Date: Mon, 10 Jul 2006 16:12:12 +0300
"Michael Fox" <michael@xxxxxxxxxxxxxxxxx> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:44b1d830@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi,If I am understand you correctly you are doing this:
We have a critical problem migrating our application to use SQLServer
2005.
One of our processes is breaking down.
The application is using ADO + Delphi 7 and has been operating without
problem for many years on previous versions of SQLServer.
In the problem process we are executing multiple SP's using TADOStoredProc
components. The SP's are doing inserts or updates.
The process is wrapped with BeginTrans, CommitTrans and on exception:
RollbackTrans. The first time the process is run everything commits
w/o error. The 2nd time the process is run, nothing gets committed.
After each insert or update in the SPs we test IF @@error <> 0 and
RAISERROR(ErrorMsg, 16, 2) WITH NOWAIT SETERROR but no error is ever
returned to the client.
On running the Profiler trace we discovered the SET FMTONLY ON and SET
NO_BROWSETABLE ON statements. Then the SP is being executed with empty
parameters (there is no RPC statement either). The SET FMTONLY OFF and
SET NO_BROWSETABLE OFF statements then follow. The SP is also being
executed with the correct parameters from our application. It is when the
SP is being executed with empty parameters that the internal rollback
appears to be occuring.
Microsoft have indicated that Delphi is trying to collect metadata
information for the client and said it is a Delphi issue.
Does anyone know how to prevent the metadata call?
We are using an asynchronous ADOConnection,
IsolationLevel=ilCursorStability, Persist Security Info=true,Provider=
SQLOLEDB
and a client side cursor.
Thank-you
Michael
1. Start tran
2. Populate SQL
3. Fill params
4. Execute query
5. Commit Tran
And yours sp doing rollback if it is called with empty params (which IMHO is
wrong).
If this is the case I am suggecting you to rearrange logic like this:
1. Populate SQL
2. Fill params
3. Start tran
4. Execute query
5. Commit Tran
.
- Follow-Ups:
- Re: ADO and MetaData
- From: Michael Fox
- Re: ADO and MetaData
- References:
- ADO and MetaData
- From: Michael Fox
- ADO and MetaData
- Prev by Date: Re: ADO and MetaData
- Next by Date: Re: Why isn't ADOExpress throwing an exception on error?
- Previous by thread: Re: ADO and MetaData
- Next by thread: Re: ADO and MetaData
- Index(es):
Relevant Pages
|