specialist
Programmer
Greetings All-
Happy holidays! I'm running into a bit of an issue with a variable being passed via querystring to return results from a SQL db. I continue to get a :
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "SELECT COUNT (*) CAS"]'
error when opening this page. Perhaps I am confused by the syntax, but for some reason it is not working properly.
The purpose of this page is to display the count and record details from a DB based on a query string value passed from a form on another page...the options are:
entries less than 30 days old
" " 60 days old
" " 90 days old
please help me if you know a possible solution. thank you in advance and happy holidays!
michael
code:
<%
'*** The following items redesignate the incoming variables for use on this page
dateCriteria = Request.Querystring("dC")
readBack = (Date - dateCriteria)
Dim qryCount
Dim qryCount_numRows
Set qryCount = Server.CreateObject("ADODB.Recordset")
qryCount.ActiveConnection = MM_STRING
qryCount.Source = "SELECT COUNT (*) Entry FROM dbo.tblInfo WHERE Initial_DTG < '" + readBack + "' AND Status = 1"
qryCount.CursorType = 0
qryCount.CursorLocation = 2
qryCount.LockType = 1
qryCount.Open()
qryCount_numRows = 0
%>
<%
Dim mainQuery
Dim mainQuery_numRows
Set mainQuery = Server.CreateObject("ADODB.Recordset")
mainQuery.ActiveConnection = MM_STRING
mainQuery.Source = "SELECT * FROM tblInfo WHERE Initial_DTG < '" + readBack + "' AND Status = 1 ORDER BY Initial_DTG ASC "
mainQuery.CursorType = 0
mainQuery.CursorLocation = 2
mainQuery.LockType = 1
mainQuery.Open()
mainQuery_numRows = 0
%>
<%
Function showBreaks(str)
showBreaks = replace(str, chr(10), " <br>")
End Function
%>
Happy holidays! I'm running into a bit of an issue with a variable being passed via querystring to return results from a SQL db. I continue to get a :
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "SELECT COUNT (*) CAS"]'
error when opening this page. Perhaps I am confused by the syntax, but for some reason it is not working properly.
The purpose of this page is to display the count and record details from a DB based on a query string value passed from a form on another page...the options are:
entries less than 30 days old
" " 60 days old
" " 90 days old
please help me if you know a possible solution. thank you in advance and happy holidays!
michael
code:
<%
'*** The following items redesignate the incoming variables for use on this page
dateCriteria = Request.Querystring("dC")
readBack = (Date - dateCriteria)
Dim qryCount
Dim qryCount_numRows
Set qryCount = Server.CreateObject("ADODB.Recordset")
qryCount.ActiveConnection = MM_STRING
qryCount.Source = "SELECT COUNT (*) Entry FROM dbo.tblInfo WHERE Initial_DTG < '" + readBack + "' AND Status = 1"
qryCount.CursorType = 0
qryCount.CursorLocation = 2
qryCount.LockType = 1
qryCount.Open()
qryCount_numRows = 0
%>
<%
Dim mainQuery
Dim mainQuery_numRows
Set mainQuery = Server.CreateObject("ADODB.Recordset")
mainQuery.ActiveConnection = MM_STRING
mainQuery.Source = "SELECT * FROM tblInfo WHERE Initial_DTG < '" + readBack + "' AND Status = 1 ORDER BY Initial_DTG ASC "
mainQuery.CursorType = 0
mainQuery.CursorLocation = 2
mainQuery.LockType = 1
mainQuery.Open()
mainQuery_numRows = 0
%>
<%
Function showBreaks(str)
showBreaks = replace(str, chr(10), " <br>")
End Function
%>