A
AussieRules
Hi,
I have a VB.NET app that writes data to a series of tables with a
transaction.
The transaction functionality is new, the code operates fine outside the
transaction scope.
The problem seems to be that when the VB code executes outside of the
transaction scope, it works. The very first SQL command writes to a table,
and returns the identity col of the table to the VB.NET app. Its a SQL
Stored proc, and the identity value is returning from with the SP via the
following code
set @val_ID = @@IDENTITY
return @val_ID
The following SQL that writes to other tables uses this return value as one
of the fields.
The problem seems to be when I introduce the transaction features, the first
stored proc doesn't return the new identity col value.
How can I get around this problem ?
I have a VB.NET app that writes data to a series of tables with a
transaction.
The transaction functionality is new, the code operates fine outside the
transaction scope.
The problem seems to be that when the VB code executes outside of the
transaction scope, it works. The very first SQL command writes to a table,
and returns the identity col of the table to the VB.NET app. Its a SQL
Stored proc, and the identity value is returning from with the SP via the
following code
set @val_ID = @@IDENTITY
return @val_ID
The following SQL that writes to other tables uses this return value as one
of the fields.
The problem seems to be when I introduce the transaction features, the first
stored proc doesn't return the new identity col value.
How can I get around this problem ?