>The direct answer: Check out SET CONTEXT_INFO in the BOL.
>
>IMO, carry the userid in the app and pass it into all procs. It will make for a much cleaner and obvious solution.
>
>-Mike
Can someone help me with the following syntax?
The convert is not working and returning the same 'context_info' every time regardless of you change the @cUID to!
declare @cUID VarChar(50)
declare @bUID binary
set @cUID = '2004102843111235'
set @cUID = convert(varchar,@@SPID) + @cUID
set @bUID = convert(binary, @cUID)
print @cUID
set Context_info @bUID
SELECT context_info
FROM master.dbo.sysprocesses
WHERE spid = @@SPID