Hi, assistance would be appreciated, I have inherited a database and a bunch of .asp scripts, I have amended the database and have managed to get to view etc on line using aspmaker, GREAT (I thought). The asp's are all used to run on a different server I am now using a PC, WIndows, XP Pro through IIS. Having not used asp before I thought I'd have a quick look and see.
The problem I am getting is:
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'PubID ='.
/asp/functions.asp, line 14
The function, The first line = 9 so line 14 = rs.Open strSQL, conn:
Function SetCurrentPub(P ubID)
OpenDB
Set rs=Server.Creat eObject("ADODB. Recordset")
strSQL = "SELECT * FROM tblPublications WHERE PubID = " & PUBID & ";"
rs.Open strSQL, conn
Session("strPub Title")=rs("tit le")
Session("strPub WorkingDirector y")="C:\inetpub \wwwroot\TiHo3\ tihov32.mdb" & rs("WorkingDir" )
'Session("strPu bWorkingDirecto ry")= strMyRoot & "Working\" & rs("WorkingDir" )
'Session("strPu bWorkingDirecto ry")= strMyRoot & "WorkingDir \" & rs("WorkingDir" )
Session("strPub ID")=rs("PubID" )
Session("strPub Template")=rs(" Template")
Session("strPub TotalPages")=rs ("TotalPages ")
Session("strPub RectsImported") =rs("RectsImpor ted")
CloseDB
End Function
Any assistance would be great, thanks.
Stevee
The problem I am getting is:
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'PubID ='.
/asp/functions.asp, line 14
The function, The first line = 9 so line 14 = rs.Open strSQL, conn:
Function SetCurrentPub(P ubID)
OpenDB
Set rs=Server.Creat eObject("ADODB. Recordset")
strSQL = "SELECT * FROM tblPublications WHERE PubID = " & PUBID & ";"
rs.Open strSQL, conn
Session("strPub Title")=rs("tit le")
Session("strPub WorkingDirector y")="C:\inetpub \wwwroot\TiHo3\ tihov32.mdb" & rs("WorkingDir" )
'Session("strPu bWorkingDirecto ry")= strMyRoot & "Working\" & rs("WorkingDir" )
'Session("strPu bWorkingDirecto ry")= strMyRoot & "WorkingDir \" & rs("WorkingDir" )
Session("strPub ID")=rs("PubID" )
Session("strPub Template")=rs(" Template")
Session("strPub TotalPages")=rs ("TotalPages ")
Session("strPub RectsImported") =rs("RectsImpor ted")
CloseDB
End Function
Any assistance would be great, thanks.
Stevee
Comment