MS SQL Server batch update transaction error
Posted: Thu 04 May 2017 13:34
Hello,
I want to perform a batch insert using the methods described in your blog post "Using Batch Updates in Delphi Data Access Components" (http://blog.devart.com/using-batch-oper ... nents.html). This should happen as part of an already open transaction. The problem is that calling "Execute" leads to the following error message: "Project XXX.exe raised exception class EOLEDBError with message 'Cannot start more transactions on this session.'".
In the releases notes for UniDac v7.0.1 it says for Firebird / Interbase: "Possibility to manage batch operations using a transaction is added". Is this still an issue when targeting SQL Server? If so, is there a workaround? If possible, all changes to the database should happen in the same transaction.
I am using Unidac v7.0.1 with Delphi XE Pro; the database server is MS SQL Server 2016.
Thanks and regards, Olaf
I want to perform a batch insert using the methods described in your blog post "Using Batch Updates in Delphi Data Access Components" (http://blog.devart.com/using-batch-oper ... nents.html). This should happen as part of an already open transaction. The problem is that calling "Execute" leads to the following error message: "Project XXX.exe raised exception class EOLEDBError with message 'Cannot start more transactions on this session.'".
In the releases notes for UniDac v7.0.1 it says for Firebird / Interbase: "Possibility to manage batch operations using a transaction is added". Is this still an issue when targeting SQL Server? If so, is there a workaround? If possible, all changes to the database should happen in the same transaction.
I am using Unidac v7.0.1 with Delphi XE Pro; the database server is MS SQL Server 2016.
Thanks and regards, Olaf