Page 1 of 1

MS SQL Server batch update transaction error

Posted: Thu 04 May 2017 13:34
by oh_ha
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

Re: MS SQL Server batch update transaction error

Posted: Fri 05 May 2017 13:13
by azyk
We cannot reproduce the specified problem. Please, compose a small test project which demonstrates it and send to us by using the contact form on our website: http://www.devart.com/company/contactform.html .

Re: MS SQL Server batch update transaction error

Posted: Mon 08 May 2017 07:39
by oh_ha
As requested I have uploaded an example.

Re: MS SQL Server batch update transaction error

Posted: Thu 11 May 2017 12:02
by azyk
Thank you for the sent sample. We reproduced the problem and fixed it. The fix will be included in the next UniDAC build.