Friday, January 3, 2014

Could not find prepared statement with handle %.

Just remove these lines:



set @p1=612

set @p2=0

set @p7=0



The display in Profiler is a little funky. Since this is an RPC call, the client does not send any query text for to SQL Server, only the procedure name and the parameter list. The SET command reveals the output values after execution of sp_cursorprepexec, but they were not passed that way from the client.


(And it is not likely that you will get back 612, because that is just the handle, and will be different next time.)





Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

No comments:

Post a Comment