主题:求助 在提交表单时出现错误 !!!!!
aned
[专家分:0] 发布于 2007-01-03 14:23:00
在提交时出现以下错误!!!!!!
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'
[Microsoft][ODBC Microsoft Access Driver] INSERT INTO 语句的语法错误。
/salseinput.asp,行115
多谢了!!!!!!
最后更新于:2007-01-03 14:24:00
回复列表 (共5个回复)
沙发
wangsdong [专家分:21390] 发布于 2007-01-03 14:32:00
已经提示115行insert into语句错误,你检查一下
板凳
aned [专家分:0] 发布于 2007-01-03 14:41:00
Dim MM_tableValues
Dim MM_dbValues
If (CStr(Request("MM_insert")) <> "") Then
' create the sql insert 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 [color=008000] “这是115行可是没有 inster to”[/color]
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
3 楼
wangsdong [专家分:21390] 发布于 2007-01-03 15:00:00
你在
MM_editCmd.Execute “这是115行可是没有 inster to”
之前将MM_editQuery输出来看看是什么。
4 楼
aned [专家分:0] 发布于 2007-01-03 15:06:00
好的
我试试
谢谢
5 楼
aned [专家分:0] 发布于 2007-01-03 15:08:00
不好意思我是刚开始学请问怎么输出??
多谢多谢
我来回复