Hellos,
Could some body look at the code below to see if they have seen this error before? I know the ADODB.Connection object is working becuase I use the same code on other pages also the ADODB.Recordset object is in use else where as well.
It generates a ADODB.Recordset 800A0BB9 error.
I'm wondering if the problem may be in the query, it runs fine in SQL Query Analyzer though.
Any Ideas?
Thanks, Danzig
Could some body look at the code below to see if they have seen this error before? I know the ADODB.Connection object is working becuase I use the same code on other pages also the ADODB.Recordset object is in use else where as well.
Code:
Dim objConn
Set objConn=CreateObject("ADODB.Connection")
ConnectSTR = "driver=SQL Server;server=SQLSVR1;uid=sqluser;pwd=sqlpswd;database=SQL1DB;"
objConn.Open ConnectSTR
str_SQL = "SELECT UserName, lst_projects.project, lst_projects.company, lst_projects.account, lst_projects.costcenter, lst_projects.wbs, SUM(projecttime)AS ttl_Hrs,Reportmonth,Reportyear, lst_projects.Closed FROM db_projects INNER JOIN lst_projects ON db_projects.projectID = lst_projects.Idx where lst_projects.Closed = 'Open' AND db_projects.ReportMonth = '06' AND db_projects.ReportYear = '2004' group by UserName,lst_projects.project, lst_projects.company, lst_projects.account, lst_projects.costcenter, lst_projects.wbs, Reportmonth,Reportyear, lst_projects.Closed Order by Username Asc, lst_projects.project Asc, Reportmonth Asc, Reportyear Asc"
set oRsNewData = CreateObject("ADODB.Recordset")
oRsNewData.Open strSQL, objConn
It generates a ADODB.Recordset 800A0BB9 error.
I'm wondering if the problem may be in the query, it runs fine in SQL Query Analyzer though.
Any Ideas?
Thanks, Danzig