Cannot create new connection because in manual or ... error
Posted: Mon 22 Aug 2011 18:44
I seem to be caught in a catch 22. I need to be able to open a large result set (~900K rows of ~5K bytes each), read each row, perform some processing and update each row. I am doing this with SQL Server 2008, dbExpress, Delphi 2007 and the DevArt driver.
If I open the result set with FetchAll=True, the driver tries to fetch all rows in the dataset quickly exhausting available memory. If I open the result set with FetchAll=False, the result set becomes non-updatable. I get the dreaded "Cannot create new connection because in manual or distributed transaction mode" error when I try to ApplyUpdates(). I have read the other posts on this forum regarding this error but am no nearer to a solution than before.
How can I write a Delphi program, using dbExpress, to read every row in a large table and update every row in that table? Without resorting to stored procedures or other server side jiggery pokery. Surely, this is a common thing to want to be able to do?
If I open the result set with FetchAll=True, the driver tries to fetch all rows in the dataset quickly exhausting available memory. If I open the result set with FetchAll=False, the result set becomes non-updatable. I get the dreaded "Cannot create new connection because in manual or distributed transaction mode" error when I try to ApplyUpdates(). I have read the other posts on this forum regarding this error but am no nearer to a solution than before.
How can I write a Delphi program, using dbExpress, to read every row in a large table and update every row in that table? Without resorting to stored procedures or other server side jiggery pokery. Surely, this is a common thing to want to be able to do?