SQL Server Express 2005 @@SPID

Hi,
which is the syntax for a stored procedure that return to me the exact
[at] [at] SPID of my current connection?

I'm using ADO in VB6 and i want to obtain [at] [at] SPID

Thank u

Rob
Yoda [ Do, 22 November 2007 11:29 ] [ ID #1876585 ]

Re: SQL Server Express 2005 @@SPID

Yoda (rmotto [at] teaminf.com) writes:
> which is the syntax for a stored procedure that return to me the exact
> [at] [at] SPID of my current connection?
>
> I'm using ADO in VB6 and i want to obtain [at] [at] SPID

CREATE PROCEDURE get_spid [at] spid OUTPUT AS
SELECT [at] spid = [at] [at] spid


--
Erland Sommarskog, SQL Server MVP, esquel [at] sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx
Erland Sommarskog [ Do, 22 November 2007 23:45 ] [ ID #1876598 ]
Datenbanken » comp.databases.ms-sqlserver » SQL Server Express 2005 @@SPID

Vorheriges Thema: importing a CSV file
Nächstes Thema: need urgent help