>Hi ALeksey
>
>>Just to make it clear, SQLSETPROP(connectionhandle,"Transactions",2) is equivalent to BEGIN TRANSACTION.
>
>Is that really correct? After issuing
>SQLSETPROP( connection, "Transactions", 2 )
>
>The query: SQLEXEC( connection, 'SELECT @@TRANCOUNT' )
>returns 0 and certainly there is no behavior to suggest that a transaction has been started.
>
>However, if I use: SQLEXEC( connection, 'INSERT INTO....' )
>Then check the transaction count, I see '1', as expected.
>
>I thought that all that setting the transactions property of the connection
>to "manual" does is to require that the client must explicitly close implicit transactions with SQLCOMMIT/SQLROLLBACK?
Hi Andy,
Logically it is correct. All data reads/writes will be included into the same transaction until SQLCOMMIT()/SQLROLLBACK(). Even if backend doesn't start transaction physically, subsequent SQLCOMMIT()/SQLROLLBACK() do not fail. It is only a plus if back end is able to avoid unnecessary physical transactions.
Thanks,
Aleksey.
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