HELP! I created two reports - one to pull # of leads submitted between two dates and another to pull # leads sold between two dates. Both were working yesterday...yet later that night (after not making any changes to the code or db), both stopped working and kept throwing the following error message:
ADODB.Recordset error '800a0e7d'
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/includes/reports/date_counts.asp, line 37
I have no problem connecting to the database (I can add, edit, list, delete, etc. with no problem), so I am not sure
why I'm getting this error? I'll list my queries below...am I using any reserved words that could be throwing my queries off?
ADODB.Recordset error '800a0e7d'
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/includes/reports/date_counts.asp, line 37
I have no problem connecting to the database (I can add, edit, list, delete, etc. with no problem), so I am not sure
why I'm getting this error? I'll list my queries below...am I using any reserved words that could be throwing my queries off?
Code:
Query 1 (get count of leads by date submitted)
'create recordset object
Set objRSDateSrchResults = Server.CreateObject("ADODB.Recordset")
sqlDateSrchResults = "SELECT test_request.curDate, Count(test_request.bus_name) AS CountOfbus_name FROM test_request GROUP BY test_request.curDate HAVING (((test_request.curDate) BETWEEN #" & date1 & "# AND #" & date2 & "#));"
'open the recordset
objRSDateSrchResults.Open sqlDateSrchResults, objConn, 2, 3
Code:
Query 2 (sum the count of leads by the date range in above query)
Set objRSDateCountResults = Server.CreateObject("ADODB.Recordset")
sqlDateCountResults = "SELECT Count(test_request.bus_name) AS CountOfbus_name FROM test_request HAVING (((test_request.curDate) BETWEEN #" & date1 & "# AND #" & date2 & "#));"
'open the recordset
objRSDateCountResults.Open sqlDateCountResults, objConn, 2, 3