Reset sp_prepexec

  • 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?

  • 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[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply