哪位高手指点下:[Microsoft][ODBC Microsoft Access Driver] 由于将在索引、 主关键字、或关系中 5

<%'IIfimplementationFunctionMM_IIf(condition,ifTrue,ifFalse)Ifcondition=""ThenMM_IIf=... <%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
If (CStr(Request("MM_insert")) = "form1") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd

Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_conn1_STRING
MM_editCmd.CommandText = "INSERT INTO info (name, pwd, email, question, answer, oicq, icq, msn, url) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, Request.Form("name")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 50, Request.Form("pwd")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 50, Request.Form("email")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 50, Request.Form("question")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 50, Request.Form("answer")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 5, 1, -1, MM_IIF(Request.Form("oicq"), Request.Form("oicq"), null)) ' adDouble
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 5, 1, -1, MM_IIF(Request.Form("icq"), Request.Form("icq"), null)) ' adDouble
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 202, 1, 50, Request.Form("msn")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 202, 1, 50, Request.Form("url")) ' adVarWChar
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "registok.html"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows

Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_conn1_STRING
Recordset1_cmd.CommandText = "SELECT * FROM info ORDER BY id ASC"
Recordset1_cmd.Prepared = true

Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] 由于将在索引、 主关键字、或关系中创建重复的值,请求对表的改变没有成功。 改变该字段中的或包含重复数据的字段中的数据,删除索引或重新定义索引以允许重复的值并再试一次。
/work/lianxi/regist.asp, 第 68 行
展开
 我来答
thomas_yang
2010-07-31 · 超过10用户采纳过TA的回答
知道答主
回答量:42
采纳率:0%
帮助的人:30.4万
展开全部
就是数据库主键字段不能重复,你看一下肯定要插入重复主键的时候出错的。
metaxing
2010-07-28 · 超过36用户采纳过TA的回答
知道小有建树答主
回答量:104
采纳率:0%
帮助的人:46万
展开全部
问题都没有写清楚,再有这么多代码放在这里,想知道啥呢
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式