Posted by Erland Sommarskog on 11/22/07 22:45
Yoda (rmotto@teaminf.com) writes:
> which is the syntax for a stored procedure that return to me the exact
> @@SPID of my current connection?
>
> I'm using ADO in VB6 and i want to obtain @@SPID
CREATE PROCEDURE get_spid @spid OUTPUT AS
SELECT @spid = @@spid
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
[Back to original message]
|