Databse query using ADODB... Heap problem
Posted on 2002-04-11
I am using ADODB for fetching records from db2.
>>set con = server.CreateObject(ADODB.connection)
>>set rs = server.createObject(ADODB.recordset)
>>rs.open select count(*) from tablename,con
This web page is used to get the report according to database datas.
A TIMESTAMP field... which having date and time of that event.. In my report ....select count(*) from table where timestampfield between starttime and endtime...
And in the report i need to give 2 hours slot.. that is 6am - 8 am.. 8 am - 10 am... like this 12 time slots come..
To achieve the above report i need 12 queries to be executed..
Here is the problem starts..
>>rs.open select count(*) from table where timestampfield between starttime and endtime,con
for the 12 slots i have created 12 recordset and above statement for 12 query excuted and reported...
It works fine..
But some times it gives heap storage exceeds the limit..this error come.. in some other application which uses the same database also got the same error..
What is my thinking in this is... while creating 12 individual instance and executing the 12 queries seperately.. the heap level exceeds at this time...
I am expecting your EXPERTS.. give some solution to do efficient way of doing this....
Is there any other method to do this query..???
Any suggestion are appreciated..
Thanks in advance.