Is it possible to access the id of the connection from Trans-SQL ?
I'd like to do something like this :
Create a connection to SQL.
Set a value in a table tied to this connection
Run a SP (one that I don't know ahead of time)
In a trigger that is set on every table in the database via the id of the
connection (or something like that) get the value that I stored in the table
for this connection.
Any ideas ?!
Thanks
Steve
[422 byte] By [
Steve] at [2007-11-9 21:11:09]

# 1 Re: Is it possible to access the id of the connection from Trans-SQL ?
select @@SPID
see @@SPID in SQL BOL
--
HTH,
David Satz
Principal Web Engineer
Hyperion Solutions
"Steve" <spw@totalise.co.uk> wrote in message
news:3e4aad8a$1@tnews.web.dev-archive.com...
> I'd like to do something like this :
>
> Create a connection to SQL.
> Set a value in a table tied to this connection
> Run a SP (one that I don't know ahead of time)
> In a trigger that is set on every table in the database via the id of the
> connection (or something like that) get the value that I stored in the
table
> for this connection.
>
> Any ideas ?!
>
> Thanks
>
> Steve
>
>
>