Re: ADO and MetaData




"Michael Fox" <michael@xxxxxxxxxxxxxxxxx> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:44b1d830@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

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
If I am understand you correctly you are doing this:
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


.



Relevant Pages

  • Re: HELP ME
    ... We need to execute update first and if SQL%ROWCOUNT < 1 then need to ... any User Define Exception to be handled and then use Raise Exception ... Above code template does not specify Commit statement. ... Name, Table primary key etc. ...
    (comp.databases.oracle.misc)
  • Re: Moved from C++ to Delphi
    ... | 1) I'm trying to execute a Application.MessageBox inside a TDM. ... | inside the TDM but in Delphi you can't. ... if (not var) or var = not var, assuming that var is a boolean ...
    (borland.public.delphi.language.objectpascal)
  • Re: [fw-wiz] Botnets, IRC servers and firewalls?
    ... Take the execute bit off the place where attachments ... A user that runs an un-protected machine, or anyone for that matter, can ... be used to DDoS, spam, bounce hackers, commit frauds, etc. ... Well than, speaking in the philosophical level, why shouldn't an ISP ...
    (Firewall-Wizards)
  • Re: Error - Please Help
    ... I am getting an error when I execute a procedure:- ...   COMMIT; ... See SQLNET.LOG to find secondary error if not provided ...
    (comp.databases.oracle.server)
  • Re: Underage drinking.
    ... without the threat of the death penalty, but I agree that it doesn't ... significantly decrease the number of people who would decide to commit ... Assuming you actully execute the right person. ... an innocent person and left a murderer ...
    (alt.fan.harry-potter)

Quantcast