Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Could not find prepared statement with handle %.

$
0
0

Greetings. I've seen several posts for this error on the web, but no clear cut answers. I captured the code below in profiler, with the intention of replaying in mgmt studio.

However, the attempt end in the following error: "Could not find prepared statement with handle 612."

declare @p1 int 
set @p1=612 
declare @p2 int
set @p2=0
declare @p7 int
set @p7=0
exec sp_cursorprepexec @p1 output,@p2 output,N'@P0 int,@P1 int,@P2 int,@P3 int,@P4 bit',N'EXEC dbo.mySproc @P0,@P1,@P2,@P3,@P4                                        ',4112,8193,@p7 output,219717,95,NULL,1,0
select @p1, @p2, @p7

Something noteworthy is that my sproc only has 5 input parameters, but this makes it look like it has many more.

How do I manipulate the code enough to make it work in mgmt studio? Thanks!



TIA, ChrisRDBA



Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>