Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Reset sp_prepexec Expand / Collapse
Author
Message
Posted Tuesday, April 29, 2014 2:13 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 2:11 AM
Points: 336, Visits: 1,155
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?
Post #1565791
Posted Thursday, May 1, 2014 5:23 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:35 AM
Points: 6,842, Visits: 13,373
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...




Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #1566672
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse