| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 491 人关注过本帖
标题:update 语句哪里有错误啊?
只看楼主 加入收藏
yiran_mimi
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-5-22
收藏
 问题点数:0 回复次数:3 
update 语句哪里有错误啊?

ASP+Access数据库

错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] UPDATE 语句的语法错误。
/研究生网/Snewuser.asp, 第 111 行


浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

网页:
POST 271 ??? /研究生网/Snewuser.asp

POST Data:
username=%D2%D4&pwdf=40331152&pwdn=40331152&realname=%C3%CF%C0%F6&sex=%C5%AE&number=40331152&department=%BC%C6%CB%E3%BB%FA&teacher=%C0%EE%D5%BC%C0%FB&lianxi=029-85580280&phone=13772455960&e-mail=yiran . . .
源代码:
<%
' *** Update Record: construct a sql update statement and execute it

If (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) <> "") Then

' create the sql update statement
MM_editQuery = "update " & MM_editTable & " set "
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_editQuery = MM_editQuery & ","
End If
MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_formVal
Next
MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId

If (Not MM_abortEdit) Then
' execute the update
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute() 这是第111行
MM_editCmd.ActiveConnection.Close

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

End If
%>

搜索更多相关主题的帖子: update 语句 
2007-05-22 12:30
guyer
Rank: 2
等 级:新手上路
威 望:5
帖 子:451
专家分:0
注 册:2007-1-19
收藏
得分:0 
MM_editCmd.Execute() 这是第111行

能在这个语句前面 把SQL 语句输出下看看么??

http://www./
2007-05-22 12:35
guyer
Rank: 2
等 级:新手上路
威 望:5
帖 子:451
专家分:0
注 册:2007-1-19
收藏
得分:0 

是不是某个地方的单引号没去掉??


http://www./
2007-05-22 13:01
laoshu1
Rank: 1
等 级:新手上路
帖 子:44
专家分:0
注 册:2007-4-14
收藏
得分:0 
楼住写代码就是这么酷!那几个MM_MMMM    让人看了眼睛花
2007-05-22 17:41
快速回复:update 语句哪里有错误啊?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017086 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved