May 26, 2011 at 12:30 pm
HI I got to execute a stored procedure but i'm getting error
here is the stored procedure that i am trying to execute
-- Login: Sahit
SET @pwd = CONVERT (varbinary(256), 0x01000ABGFDSECDS)
EXEC master..sp_addlogin 'sahit', @pwd, @sid = 0xCF67E, @encryptopt = 'skip_encryption'
i'm getting an error
server: msg 137, level 15, state 1, line 3
must declare the variable '@pwd'
server: msg 137, level 15, state 1, line 3
must declare the variable '@pwd'
can some one help me out with this please.
May 26, 2011 at 12:40 pm
you must declare the variable before using it
and the parameter is @passwd for that procedure, so...
declare @pwd varbinary(256)
SET @pwd = CONVERT (varbinary(256), 0x01000ABGFDSECDS)
EXEC master..sp_addlogin 'sahit',@passwd = @pwd, @sid = 0xCF67E, @encryptopt = 'skip_encryption'
try that
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply