If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Microsoft JET Database Engine (0x80040E14)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-08-04, 11:23
genocide7 genocide7 is offline
Registered User
 
Join Date: Feb 2004
Posts: 6
Microsoft JET Database Engine (0x80040E14)

hello..

an error prompted when i submitted my form..

this is the error :

Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
/kiosk/discount.asp, line 115

and this is my sql statement :
<%
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_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
%>

i can't find which line that i've done mistakes..thanks!
Reply With Quote
  #2 (permalink)  
Old 02-08-04, 15:48
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
response.write the following without executing the sql:
MM_editQuery = "insert into "& MM_editTable & " ("& MM_tableValues & ") values ("& MM_dbValues & ")"

This will show the actual insert statement being used and you will be able to see where the problem is. If not, post what is returned from the response.write.
__________________
If you do not have SQL Server Books Online (BOL) installed - please do so. The majority of questions asked in the SQL Server forum could be eliminated if people had access to bol. BOL
Reply With Quote
  #3 (permalink)  
Old 02-08-04, 19:55
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
The string of MM_tableValues ends ",". So what is the function of MM_columns(MM_i)?
Reply With Quote
  #4 (permalink)  
Old 04-21-04, 04:59
rosiedong rosiedong is offline
Registered User
 
Join Date: Apr 2004
Location: London, beijing
Posts: 2
Talking did you deal with it?

I think you used the dreamweaver to program. this article could be helpful.
http://www.adopenstatic.com/faq/80040e14.asp
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On