April 29, 2014 at 2:13 am
Can we reset sp_prepexec and sp_execute
When i am running the sp_prepexec the id is generated say it is 22 then i used sp_execute 22 to execute the statement.
now can i reseed the statement sp_prepexec to start from initial?
sp_prepexec will it start from 1 and can i use sp_execute 1?
May 1, 2014 at 5:23 am
There is no "initial" value. See this link for a syntax description.
The handle is a system generated int value to uniquely identify the statement. The handle is not
You can (and should!) use sp_unprepare to free memory if the prepared statement is no longer in use. This may (or may not) lead to a lower number returned as the next handle. The handle value is not bound to a single statment.
Based on your description I'm guessing you're planning to "misuse" a handle id for process or loop control. If that's the case then there might be something wrong with your concept in general...
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply