Page 1 of 1

Explicit transaction control

Posted: Mon 30 Nov 2009 09:23
by salim_naufal
I have a multi-thredded application and would like to take full control of transactions.
This is the scenario.
Thread 1: Start Transaction, execute a set of SQL commands, Commit transaction
Thread 2: Start Transaction, execute another set of SQL commands, Commit Transaction

I am sharing the same TMSConnection component. When thread 2 is running, executing "commit transaction" will commit for both threads.

Is there a way of assigning SQL statements to a specific Transaction?
I have experience with Interbase/Firebird where SQL components have a property linking it to a specific transaction component.

Thanks

Salim

Posted: Mon 30 Nov 2009 10:40
by Dimon
SDAC doesn't support such functionality, because, unlike InterBase, SQL Server doesn't support parallel transactions. You should use some connections (TMSConnection components) to create some parallel transactions.

Posted: Mon 30 Nov 2009 16:12
by salim_naufal
Thanks for the info. I am still learning about MsSQL.
Best Regards
Salim