Hidden error kills my transaction. Help!

From: Miroo_news (miroo_at_USUNTO.poczta.fm)
Date: 03/10/04


Date: Wed, 10 Mar 2004 09:32:56 +0100

Hi,
The situation is as follows:
- I have a stored procedure with parameter
  @ID_DOC Char(36) OUTPUT, --for uniqueidentifier
  (and other paramters)
- the first line in procedure is:
  select @cnt = count(*) from docs where id_doc = @ID_DOC
- the transaction begins
- the parameter @ID_DOC is set in Delphi
  to value (for example): 'ED5B7DD0-BBDD-45C5-912E-64F73720080B'
- the procedure is called from Delphi using ADO
- the procedure finishes properly
But:
Profiler shows there is an error:
  Error: 8169, Severity: 16, State: 2 = 'Syntax error converting from a
character string to uniqueidentifier.'
The transaction is rollbacked
The procedure goes on as the error wasn't raised

Why? Why the error which rollbacks the transaction
is not returned to Delphi as exception?
Why it occures?

Regards,
Miroo

ps.
Don't ask me why uniqueidentifier is stored in
char(36) parameter - this is not my own procedure.



Relevant Pages

  • Re: HELP!!! - Urgent assistance is needed
    ... Changed the keyfield from UNIQUEIDENTIFIER into INT ... Used Delphi 6 ... MasterDetail relations in the datamodule (MasterSource-->MasterFields ...
    (borland.public.delphi.database.ado)
  • Re: transaction with unknown nbr of commands
    ... then call your wrapper stored procedure, passing it all of the user ... explicit transaction with a BEGIN TRAN statement, ... >When I run a sqlcommand in a transaction, ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: Database updating issue
    ... I started a transaction on the connection class, passed this to the dataadapter, invoked the Update method on the dataadapter and finally commit the transaction. ... try threading the these calls to the stored procedure. ... To accomplish this task, the inserting of all rows, at the moment, I'm using ...
    (microsoft.public.dotnet.framework)
  • Re: SQLServerException: The server failed to resume the transactio
    ... Are you doing transaction management in your stored procedure? ... Can you post your stored procedure defintion, ... If I remove the transaction management code from the proc then everything ... I'm preparing a CallableStatement at the start of the loop and I'm reusing ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: Error Handling.
    ... BEGIN TRANSACTION statement inside of a stored procedure, ... server is less efficient and more prone to problems. ... Error handling in your sprocs is necessary for performance, ...
    (microsoft.public.sqlserver.clients)