I inherited a script and was left with the responsibility to maintain it. Recently there a problem has surfaced and I cannot find the source of this issue. The error I receive is the following.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'checklistID ='.
/ordering/admin-itemlist.asp, line 93
I open up the file admin-itemlist.asp and refer to line 93
Dim check, media, rs5, Rsql, temp
If checklistnumber = "all" then
check = "All CheckLists"
elseif checklistnumber = "" then
Rsql = "SELECT * FROM CheckLists"
Set rs5=conn.execute(Rsql)
Do While Not rs5.eof
If rs5("FromDate") <= Date() and rs5("ToDate") >= Date() then
temp = rs5(0)
End If
rs5.movenext
Loop
Rsql = "SELECT checklistNumber FROM CheckLists WHERE checklistID = "&temp&""
Set rs5=conn.execute(Rsql)
check = rs5(0)
Line 93 is
Rsql = "SELECT checklistNumber FROM CheckLists WHERE checklistID = "&temp&""
I referred to resources online but no suggestions have helped resolve this issue. Anyone have any further suggestions?
Eventually everything will be PHP with MySQL backend but I must work with what has worked until I can make the conversion. Any help is appreciated.