| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1015 人关注过本帖
标题:使用DW和access做更新操作时显示: 参数类型不正确,或不在可以接受的范围 ...
只看楼主 加入收藏
ds123123
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2021-6-13
收藏
 问题点数:0 回复次数:1 
使用DW和access做更新操作时显示: 参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
使用DW和access做更新操作时显示:

错误 '800a0bb9'

参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

/修改信息.asp,行 38

有没有朋友知道呀,在线等!

代码:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/denglu.asp" -->
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
  MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If

' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' 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_update")) = "form1") Then
  If (Not MM_abortEdit) Then
    ' execute the update
    Dim MM_editCmd

    Set MM_editCmd = Server.CreateObject (")
    MM_editCmd.ActiveConnection = MM_denglu_STRING
    MM_ = "UPDATE [admin] SET [用户名] = ?, [密码] = ?, [电子邮箱] = ?, [电话号码] = ? WHERE [账号] = ?"
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 201, 1, -1, Request.Form("用户名")) ' adLongVarChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 201, 1, -1, Request.Form("密码")) ' adLongVarChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 201, 1, -1, Request.Form("电子邮箱")) ' adLongVarChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 201, 1, -1, Request.Form("电话号码")) ' adLongVarChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", -1, 1, -1, MM_IIF(Request.Form("MM_recordId"), Request.Form("MM_recordId"), null)) ' N/A
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    ' append the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "提示修改个人信息成功 .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__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("xgid") <> "") Then
  Recordset1__MMColParam = Request.QueryString("xgid")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows

Set Recordset1_cmd = Server.CreateObject (")
Recordset1_cmd.ActiveConnection = MM_denglu_STRING
Recordset1_ = "SELECT * FROM admin WHERE [账号] = ?"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 255, Recordset1__MMColParam) ' adVarChar

Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改信息</title>
</head>

<body>
<form id="form1" name="form1" method="POST" action="<%=MM_editAction%>">
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>用户名:
    <label for="textfield"></label>
    <input name="用户名" type="text" id="用户名" value="<%=(Recordset1.Fields.Item("用户名").Value)%>" />
  </p>
  <p>密码:
    <input name="密码" type="text" id="密码" value="<%=(Recordset1.Fields.Item("密码").Value)%>" />
  </p>
  <p>电子邮箱:
    <input name="电子邮箱" type="text" id="电子邮箱" value="<%=(Recordset1.Fields.Item("电子邮箱").Value)%>" />
  </p>
  <p>电话号码:
    <input name="电话号码" type="text" id="电话号码" value="<%=(Recordset1.Fields.Item("电话号码").Value)%>" />
  </p>
  <p>
    <input type="submit" name="button" id="button" value="提交" />
  取消</p>
  <p>&nbsp; </p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <input type="hidden" name="MM_update" value="form1" />
  <input type="hidden" name="MM_recordId" value="<%= Recordset1.Fields.Item("账号").Value %>" />
</form>
</body>
</html>
搜索更多相关主题的帖子: value Dim Request name End 
2021-06-13 15:45
ds123123
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2021-6-13
收藏
得分:0 
在线等,大神们帮忙看看吧~
2021-06-13 15:46
快速回复:使用DW和access做更新操作时显示: 参数类型不正确,或不在可以接受的 ...
数据加载中...
 
   



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

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