ReportingAnalyst
MIS
I have 2 divs in my page. I click on an employee and it passes that EmpID to that the below SQL and shows the list of reports in the 2nd div. When I test the SQL to see what is passing, I see that the query is working right and so is the querystring that is being passed.
But when I comment out the "Response.End"
and I click on an Employee, then I get an error at line 25 which is :
The error I get is:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/scripts/getReports.asp, line 25
My code is:
Any ideas why I am getting the error. Thanks.
But when I comment out the "Response.End"
and I click on an Employee, then I get an error at line 25 which is :
Code:
rsPlan.open planSQL, Conn
The error I get is:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/scripts/getReports.asp, line 25
My code is:
Code:
strEmp_ID = request.querystring("q")
If strEmp_ID = "" Then
strEmp_ID = strEmpID
End If
Dim rsPlan
Set rsPlan = Server.CreateObject("ADODB.Recordset")
Dim planSQL
planSQL = "SELECT DISTINCT Report.PlanSetup, Report.Report, AMP.EmpID, AMP.DateOfPost " & _
"FROM Report INNER JOIN " & _
"PlanSetup ON Report.PlanSetup = PlanSetup.UniqueIdentifier INNER JOIN " & _
"AMP ON PlanSetup.DisplayName = AMP.PlanSetup " & _
"WHERE AMP.EmpID = " & strEmp_ID & " AND " & _
"AMP.DateOfPost IN (SELECT MAX(DateOfPost) FROM AMP WHERE EmpID = " & strEmp_ID & ") "
Response.Write planSQL & "<br>"
Response.Write strEmp_ID & "<br>"
'Response.End
Any ideas why I am getting the error. Thanks.