Identifying the active Transaction / Session across spCalls from C# client  
Author Message
Tarhik





PostPosted: Fri Jun 22 08:05:00 CDT 2007 Top

SQL Server >> Identifying the active Transaction / Session across spCalls from C# client

Hi all,

i am facing a paculiear problem. the problem is as below

i need to update different columns of a same table, the calls will
come as different calls from a client written in C#. still more
paculier is the order of the call is not defined... but. one thing is
sure that all calls will be in the same transaction.

In the first SP call in the transaction, i must create a new row in
the table and during subsiquent calls i must update the differnt
columns of the row i have created in the first call.

The Problem is identifying the first SP call in the transaction.

Any suggestions are greatly appersiated...

Regards
Ravi

SQL Server228  
 
 
jbellnewsposts





PostPosted: Fri Jun 22 08:05:00 CDT 2007 Top

SQL Server >> Identifying the active Transaction / Session across spCalls from C# client Hi Ravi



> Hi all,
>
> i am facing a paculiear problem. the problem is as below
>
> i need to update different columns of a same table, the calls will
> come as different calls from a client written in C#. still more
> paculier is the order of the call is not defined... but. one thing is
> sure that all calls will be in the same transaction.
>
> In the first SP call in the transaction, i must create a new row in
> the table and during subsiquent calls i must update the differnt
> columns of the row i have created in the first call.
>
> The Problem is identifying the first SP call in the transaction.
>
> Any suggestions are greatly appersiated...
>
> Regards
> Ravi
>
SQL Profiler has a SQLTransaction event which may help yuo track it down.

John