I have a shopping cart working great with Powerclimb extension. Have decided to make it save to table. To do so needed the "insert record" code which was added by DW and uneditted by me. The cart's page shows the following error:
>>>>>>>>>>>>>>>>>ERROR
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/viewcart.asp, line 92
>>>>>>>>>>>>>>>LINE 92 READS
MM_editCmd.Execute
>>>>>>>>>>>>>>>>ENTIRE CODE READS
<%
' *** Insert Record: construct a sql insert statement and execute it
If (CStr(Request("MM_insert"
) <> ""
Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
FormVal = MM_fields(i+1)
MM_typeArray = Split(MM_columns(i+1),","
Delim = MM_typeArray(0)
If (Delim = "none"
Then Delim = ""
AltVal = MM_typeArray(1)
If (AltVal = "none"
Then AltVal = ""
EmptyVal = MM_typeArray(2)
If (EmptyVal = "none"
Then EmptyVal = ""
If (FormVal = ""
Then
FormVal = EmptyVal
Else
If (AltVal <> ""
Then
FormVal = AltVal
ElseIf (Delim = "'"
Then ' escape quotes
FormVal = "'" & Replace(FormVal,"'","''"
& "'"
Else
FormVal = Delim + FormVal + Delim
End If
End If
If (i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End if
MM_tableValues = MM_tableValues & MM_columns(i)
MM_dbValues = MM_dbValues & FormVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & "
values (" & MM_dbValues & "
"
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
End If
%>
ANY IDEAS?
Ladyborg
"Many of life's failures are people who did not realize how close they were to success when they gave up." [Thomas A. Edison]
>>>>>>>>>>>>>>>>>ERROR
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/viewcart.asp, line 92
>>>>>>>>>>>>>>>LINE 92 READS
MM_editCmd.Execute
>>>>>>>>>>>>>>>>ENTIRE CODE READS
<%
' *** Insert Record: construct a sql insert statement and execute it
If (CStr(Request("MM_insert"
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
FormVal = MM_fields(i+1)
MM_typeArray = Split(MM_columns(i+1),","
Delim = MM_typeArray(0)
If (Delim = "none"
AltVal = MM_typeArray(1)
If (AltVal = "none"
EmptyVal = MM_typeArray(2)
If (EmptyVal = "none"
If (FormVal = ""
FormVal = EmptyVal
Else
If (AltVal <> ""
FormVal = AltVal
ElseIf (Delim = "'"
FormVal = "'" & Replace(FormVal,"'","''"
Else
FormVal = Delim + FormVal + Delim
End If
End If
If (i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End if
MM_tableValues = MM_tableValues & MM_columns(i)
MM_dbValues = MM_dbValues & FormVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & "
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 <> ""
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
ANY IDEAS?
Ladyborg
"Many of life's failures are people who did not realize how close they were to success when they gave up." [Thomas A. Edison]