Reputation: 1
i have next code when user login in program:
declare @p1 int
set @p1=1073741826
declare @p2 int
set @p2=180150003
declare @p5 int
set @p5=1
declare @p6 int
set @p6=8
declare @p7 int
set @p7=1
exec sp_cursorprepexec @p1 output,@p2 output,N'@P1 varchar(30)',N'
SELECT US_WarningFlag, datediff(day, ISNULL(US_LastPassChange, convert(datetime, ''1900-01-01'',
120)), GetDate()), ISNULL(US_PassExpireTime, -1), US_PassMinLength
FROM dbo.UserList
WHERE US_UserID = @P1',@p5 output,@p6 output,@p7 output,'Userlogin'
select @p1, @p2, @p5, @p6, @p7<br/>
its complete with error:
Msg 16902, Level 16, State 20, Procedure sp_cursorprepexec, Line 1 sp_cursorprepexec: The value of the parameter 'scrollopt' is invalid.
Do some one know, how fix that?
Upvotes: 0
Views: 2679
Reputation: 806
Comment out the setting of @p1 and @p2, and set @p5 = 4097.
Also take out the html line-break at the end, if that's not a typo.
I take it you're looking at profile/trace results, at the RPC:Completed. Find the matching (via SPID) RPC:Starting, this should execute without any edits.
Upvotes: 4