Forums

This topic is locked

HELP!!! Inserting into database errors!

Posted 12 Feb 2002 03:46:19
1
has voted
12 Feb 2002 03:46:19 Glenn Campbell posted:
I am getting errors when trying to submit my form into a database. I have about 109 fields submitting into the database, and I thought that I had everything set right. Here is the error that I get:


Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '1'.

/shift_letter/shiftletter.asp, line 90




Here is sample of the code:


(Lines 20 -31)

If (CStr(Request("MM_insert") <> "" Then

MM_editConnection = MM_shiftletter_STRING
MM_editTable = "shiftletter.shiftletter"
MM_editRedirectUrl = ""
MM_fieldsStr = "Crew|value|day|value|split|value|1deck|value|2deck|value|mix|value|sdsos|value|exeos|value|chs1cnt|value|chs2cnt|value|bldsos|value|bldeos|value|lanebank|value|ch1srg|value|chsopt16|value|turbopt4|value|firstjob|value|acspage|value|compar|value|frsserver|value|hocrbox|value|uplddwnld|value|lphealth|value|gateways|value|posmon|value|qasserver|value|messages|value|pmhv|value|pucks|value|sdbcast1|value|sdbcast2|value|exbcast1|value|exbcast2|value|ucchk|value|dsdscrn|value|odlscrn|value|sdbsos|value|sdbeos|value|sdpsos|value|sdpeos|value|sdtsos|value|sdteos|value|chl1sos|value|chl1eos|value|chl2sos|value|chl2eos|value|exbsos|value|exbeos|value|expsos|value|expeos|value|extsos|value|exteos|value|400bldg|value|acspaging|value|adsavsolb|value|cbs2|value|cdc|value|chassislines|value|computerrm|value|curntbasetest|value|enginelines|value|eolrolls|value|exbody|value|exlanebnk|value|exbtf|value|expaint|value|extochas|value|extrim|value|framelines|value|frsletter|value|hocrboxes|value|ironpeople|value|network|value|pageterm|value|predelivery|value|printers|value|pucksheet|value|qls|value|sdbody|value|sdpaint|value|sdtrim|value|telxon|value|tirewheel|value|toein|value|ucs|value|misc|value|stckrbtf|value|bxpuloutdone|value|bxpuloutleft|value|cellscorrected|value|holds|value|lateboxes|value|missingboxes|value|scheduler|value|substation|value|vlchangs|value|trkngslowdwn|value|trkngpages|value|catswtchtime|value|lstfrstex|value|lstdecked|value|catprob1|value|catprob2|value|catdesc|value|emailbxreprt|value|bcastprinter|value|calllog|value|frsnightltr|value|drainsurges|value|status|value"
MM_columnsStr = "crew|',none,''|day|',none,''|split|',none,''|1deck|',none,''|2deck|',none,''|mix|',none,''|sdsos|',none,''|turboopt4|',none,''|chs1cnt|',none,''|chs2cnt|',none,''|bldsos|',none,''|bldeos|',none,''|lanebank|',none,''|ch1srg|',none,''|chsopt16|',none,''|turboopt4|',none,''|firstjob|',none,''|acspage|',none,''|compar|',none,''|frsserver|',none,''|hocrbox|',none,''|uplddwnld|',none,''|lphealth|',none,''|gateways|',none,''|posmon|',none,''|qasserver|',none,''|messages|',none,''|pmhv|',none,''|pucks|',none,''|sdbcast1|',none,''|sdbcast2|',none,''|exbcast1|',none,''|exbcast2|',none,''|ucchk|',none,''|dsdsrcn|',none,''|odlscrn|',none,''|sdbsos|',none,''|sdbeos|',none,''|sdpsos|',none,''|sdpeos|',none,''|sdtsos|',none,''|sdteos|',none,''|chl1sos|',none,''|chl1eos|',none,''|chl2sos|',none,''|chl2eos|',none,''|exbsos|',none,''|exbeos|',none,''|expsos|',none,''|expeos|',none,''|extsos|',none,''|exteos|',none,''|400bldg|',none,''|acspaging|',none,''|adsavsolb|',none,''|cbs2|',none,''|cdc|',none,''|chassislines|',none,''|computerrm|',none,''|curntbasetest|',none,''|enginelines|',none,''|eolrolls|',none,''|exbody|',none,''|exlanebnk|',none,''|exbtf|',none,''|expaint|',none,''|extochas|',none,''|extrim|',none,''|framelines|',none,''|frsletter|',none,''|hocrboxes|',none,''|ironpeople|',none,''|network|',none,''|pageterm|',none,''|predelivery|',none,''|printers|',none,''|pucksheet|',none,''|qls|',none,''|sdbody|',none,''|sdpaint|',none,''|sdtrim|',none,''|telxon|',none,''|tirewheel|',none,''|toein|',none,''|ucs|',none,''|misc|',none,''|stckbtf|',none,''|bxpuloutdone|',none,''|bxpuloutleft|',none,''|cellscorrected|',none,''|holds|',none,''|lateboxes|',none,''|missingboxes|',none,''|scheduler|',none,''|substation|',none,''|vlchangs|',none,''|trkngslowdwn|',none,''|trkngpages|',none,''|catswtchtime|',none,''|lstfrstex|',none,''|lstdecked|',none,''|catprob1|',none,''|catprob2|',none,''|catdesc|',none,''|emailbxreprt|',none,''|bcastprinter|',none,''|calllog|',none,''|frsnightltr|',none,''|drainsurges|',none,''|status|',none,''"


Here is the line 90

If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command"
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> "" Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

Can someone please HELP!!!

Reply to this topic