General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>
>Hi Fabio,
>Just curious
>
>Wouldnt this
>SQLEXEC(,'BEGIN TRAN;write command;COMMIT')>0
>be same as
>SQLEXEC(,'Insert ...')>0 since it executes in only one batch ?
>
>COuld U explain a bit ?
>
>Suhashegde
>
>
>If you can complete the transaction with a single batch
>( if the "write command" not required other feedback data from the client's application )
>then do it with a single batch.
>
>The
>SQLEXEC(,'BEGIN TRAN;write command;COMMIT')>0
>is like
>SQLEXEC(,'BEGIN TRAN')>0 AND SQLEXEC(,'write command')>0 AND SQLEXEC(,'COMMIT')>0
>but it is faster and the probability that it go ok is upper.
>
>If "write command" is a single T-SQL, then BEGIN TRAN;;COMMIT are implicit.
>
>Fabio
Would the above be usefull involving while updating bufferered changes ? I.e making a cursor updatable and then updating the cursor ?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only