I am trying to create a website that will be used to submit job requests. I have created the form and have created the asp file in which will submit the request to a database. I know the connection for the database works because another form in the site works when submitting to another table in the database. When I try to submit the data for the job I get an error stating
------------------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/MAIRequests/additem.asp, line 42
------------------------------------------------------------
The code for this page is below
------------------------------------------------------------
<!--#include file="maireq.asp"-->
<%
Dim rsRequest
Dim blnNew
Set rsRequest = Server.CreateObject("ADODB.Recordset"
rsRequest.Open "maireq", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable
If Request.Form("Delete" <> "" Then
rsRequest.Filter = "RequestID = " & Request("RequestID"
If Not rsRequest.EOF Then rsRequest.Delete
Else
If Request("RequestID" = "" Then
blnNew = True
rsRequest.AddNew
Else
rsRequest.Filter = "RequestID = " & Request("RequestID"
blnNew = False
End If
rsRequest("RType" = Request.Form("RType"
rsRequest("ProdFam" = Request.Form("ProdFam"
rsRequest("ProdCode" = Request.Form("ProdCode"
rsRequest("AA#" = Request.Form("AA#"
rsRequest("PBA#" = Request.Form("PBA#"
rsRequest("WO#" = Request.Form("WO#"
rsRequest("Quan" = Request.Form("Quan"
rsRequest("Prebldst" = Request.Form("Prebldst"
rsRequest("BOMRdy" = Request.Form("BOMRdy"
rsRequest("BIOS" = Request.Form("BIOS"
rsRequest("EEPROM" = Request.Form("EEPROM"
rsRequest("Tststrat" = Request.Form("Tststrat"
rsRequest("BldType" = Request.Form("BldType"
rsRequest("BrdType" = Request.Form("BrdType"
rsRequest("PrgObj" = Request.Form("PrgObj"
rsRequest("BldHiLt" = Request.Form("BldHiLt"
rsRequest("StenMid#" = Request.Form("StenMid#"
rsRequest("BrdRot" = Request.Form("BrdRot"
rsRequest("WavMID#" = Request.Form("WavMID#"
rsRequest("WavIn#" = Request.Form("WavIn#"
rsRequest("WavRot" = Request.Form("WavRot"
rsRequest("BrdPath" = Request.Form("BrdPath"
rsRequest("WWID" = Session("WWID"
rsRequest("Status" = "Active"
LINE 42 ---> rsRequest.Update
If blnNew Then
Dim rsRequester
Set rsRequester = Server.CreateObject("ADODB.Recordset"
rsRequester.Open "User", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable
rsRequester.Filter = "WWID = " & Session("WWID"
If rsRequester.EOF Then
rsRequester.AddNew
rsRequester("WWID" = Session("WWID"
rsRequester("ItemsRequested" = 0
rsRequester("ItemsActive" = 0
End If
rsRequester("ItemsRequested" = rsRequester("ItemsRequested" + 1
rsRequester("ItemsActive" = rsRequester("ItemsActive" + 1
rsRequester("LastActivity" = Now
rsRequester.Update
rsRequester.Close
Set rsRequester = Nothing
End If
End If
rsRequest.Close
Set rsRequest = Nothing
Response.Redirect "MyRequests.asp"
%>
------------------------------------------------------------
I am a newbie to VBScript and to asp so if you could help me out with what concept I am missing along with the fix it would be greatly appreciated. However if you only have time to write the fix that is fine.
Thanks
Russ
------------------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/MAIRequests/additem.asp, line 42
------------------------------------------------------------
The code for this page is below
------------------------------------------------------------
<!--#include file="maireq.asp"-->
<%
Dim rsRequest
Dim blnNew
Set rsRequest = Server.CreateObject("ADODB.Recordset"
rsRequest.Open "maireq", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable
If Request.Form("Delete" <> "" Then
rsRequest.Filter = "RequestID = " & Request("RequestID"
If Not rsRequest.EOF Then rsRequest.Delete
Else
If Request("RequestID" = "" Then
blnNew = True
rsRequest.AddNew
Else
rsRequest.Filter = "RequestID = " & Request("RequestID"
blnNew = False
End If
rsRequest("RType" = Request.Form("RType"
rsRequest("ProdFam" = Request.Form("ProdFam"
rsRequest("ProdCode" = Request.Form("ProdCode"
rsRequest("AA#" = Request.Form("AA#"
rsRequest("PBA#" = Request.Form("PBA#"
rsRequest("WO#" = Request.Form("WO#"
rsRequest("Quan" = Request.Form("Quan"
rsRequest("Prebldst" = Request.Form("Prebldst"
rsRequest("BOMRdy" = Request.Form("BOMRdy"
rsRequest("BIOS" = Request.Form("BIOS"
rsRequest("EEPROM" = Request.Form("EEPROM"
rsRequest("Tststrat" = Request.Form("Tststrat"
rsRequest("BldType" = Request.Form("BldType"
rsRequest("BrdType" = Request.Form("BrdType"
rsRequest("PrgObj" = Request.Form("PrgObj"
rsRequest("BldHiLt" = Request.Form("BldHiLt"
rsRequest("StenMid#" = Request.Form("StenMid#"
rsRequest("BrdRot" = Request.Form("BrdRot"
rsRequest("WavMID#" = Request.Form("WavMID#"
rsRequest("WavIn#" = Request.Form("WavIn#"
rsRequest("WavRot" = Request.Form("WavRot"
rsRequest("BrdPath" = Request.Form("BrdPath"
rsRequest("WWID" = Session("WWID"
rsRequest("Status" = "Active"
LINE 42 ---> rsRequest.Update
If blnNew Then
Dim rsRequester
Set rsRequester = Server.CreateObject("ADODB.Recordset"
rsRequester.Open "User", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable
rsRequester.Filter = "WWID = " & Session("WWID"
If rsRequester.EOF Then
rsRequester.AddNew
rsRequester("WWID" = Session("WWID"
rsRequester("ItemsRequested" = 0
rsRequester("ItemsActive" = 0
End If
rsRequester("ItemsRequested" = rsRequester("ItemsRequested" + 1
rsRequester("ItemsActive" = rsRequester("ItemsActive" + 1
rsRequester("LastActivity" = Now
rsRequester.Update
rsRequester.Close
Set rsRequester = Nothing
End If
End If
rsRequest.Close
Set rsRequest = Nothing
Response.Redirect "MyRequests.asp"
%>
------------------------------------------------------------
I am a newbie to VBScript and to asp so if you could help me out with what concept I am missing along with the fix it would be greatly appreciated. However if you only have time to write the fix that is fine.
Thanks
Russ