buddhi
Posts: 2
|
Posted: 11/02/2014, 2:26 PM |
|
I have a page which uses an SQL query to create a report. I can look for data the the whole month and there is no issue. But when I look for data within a specific date period which is about 2 week. I get the error saying
ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed
Class.asp, line 3118
Which is the line getting the EOF property of the recordset.(Recordset.EOF)
I ran that query in SQL management studio and I was able to obtained data, but the query did take several minutes to get it.
I debugged the problem and I added some print statements in the page where the EOF property is called. I added a print statement in the EOF class file to see the Recordset.state property.
For a time interval it worked, the Recordset.state is 1 every time the EOF property function is called. But when I run the page with the time interval that doesn't work. It takes about 2 mins for the first EOF property to be called and once its called, the Recordset.state is 0 and the program crashes.
I'm really stuck with this one and I would really appreciate if someone could assist me with this problem.
Thanks
_________________
Buddhi.. |
|
|
eratech
Posts: 513
|
Posted: 11/02/2014, 7:09 PM |
|
Could the timeout on the connection to the database be an issue?
It is possible that the query is taking too long and closing the connection and then when it goes to check the Recordset, it is gone. With the connection pooling in the ADODB you might find that it takes a different length of time to timeout.
I have had success with long-running queries to first try and streamline them, and then perhaps create some date-bounded Views (ie: a view that shows you want you want, but with a criteria for only the last, say, 2 years of data) The view is usally quicker to run as the server can work out what is needed beforehand.
Hope that helps
Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
|
|
|