ADO Object was Open error aka DB_E_OBJECTOPEN on Large Dataset in MS SQL 2012
Posted on 2014-04-14
Hi I am running a query with a big result set in my Delphi application using tADOQuery.
When I request 12 months data I get an error "Object was Open".
But if I run the same query on 1 month of data it works fine.
The mechanism I use to open all queries in my application is the same and has always worked for many years. This is the first time I have hit this error.
In my research I found that this seems to correspond to an ADO Error DB_E_OBJECTOPEN.
The 12 month query runs OK in SQL Mgmt Studio and takes about 1.5 minutes to start showing results. But it is 4 minutes before it works out there are 3,810,979 rows.
I am using a client cursor