dbTalk Databases Forums  

SQL Server Express 2005 @@SPID

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss SQL Server Express 2005 @@SPID in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Yoda
 
Posts: n/a

Default SQL Server Express 2005 @@SPID - 11-22-2007 , 04:29 AM






Hi,
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

Thank u

Rob

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Server Express 2005 @@SPID - 11-22-2007 , 04:45 PM






Yoda (rmotto (AT) teaminf (DOT) com) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.