在线 等 你的答复 速度

wgj0526 2007-07-10 03:39:45
Microsoft VBScript 运行时错误 (0x800A01C2)
错误的参数个数或无效的参数属性值: 'Rs'
/shopping/index.asp, 第 30 行

我很菜 你看哪不对 直接改 谢谢 最好这部分代码全给我改好了

我的代码:

<%
Set Con=Server.CreateObject("ADODB.connection")
Con.Open="File Name=C:\Inetpub\wwwroot\shopping\data\db.udl"
action=trim(Request("action"))
xm=trim(Request("xm"))
sheng=trim(Request("sheng"))
shi=trim(Request("shi"))
xz=trim(Request("xz"))
cun=trim(Request("cun"))
mph=trim(Request("mph"))
yb=trim(Request("yb"))
gzdw=trim(Request("gzdw"))
lxdh=trim(Request("lxdh"))
dzyx=trim(Request("dzyx"))

if action="index" then checkpass=true
if len(xm)<1 then checkpass=false
if len(sheng)<1 then checkpass=false
if len(shi)<1 then checkpass=false
if len(xz)<1 then checkpass=false
if len(cun)<1 then checkpass=false
if len(yb)<1 then checkpass=false
if len(gzdw)<1 then checkpass=false
if len(lxdh)<1 then checkpass=false
if len(dzyx)<1 then checkpass=false

Set Rs=Server.CreateObject("ADODB.Connection")
query="select xm from xinxi where xm='"+xm+"'"
Rs.Open query,Con,1,3
rs("xm")=xm
rs("sheng")=sheng
rs("shi")=shi
rs("xz")=xz
rs("cun")=cun
rs("mph")=mph
rs("yb")=yb
rs("gzdw")=gzdw
rs("lxdh")=lxdh
rs("dzyx")=dzyx

rs.update
rs.close
Response.Redirect"/shopping/index.asp"

%>

...全文
120 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
hookee 2007-07-10
  • 打赏
  • 举报
回复
调试方法:
1.要确保Con是正确打开的,用 response.Write Con.State查看是不是>0
2 查字段的数据类型和输入的数据是不是匹配,response.Write下输出的数据,比对一下是不是有问题。
yxxue 2007-07-10
  • 打赏
  • 举报
回复
第30行是哪一行?
wgj0526 2007-07-10
  • 打赏
  • 举报
回复
按2楼的改了后 提示

ADODB.Recordset (0x800A0BCD)
未知的运行时错误
/shopping/index.asp, 第 30 行
wgj0526 2007-07-10
  • 打赏
  • 举报
回复
我说的是楼上的楼上的楼上
wgj0526 2007-07-10
  • 打赏
  • 举报
回复
楼上详细点..
yxxue 2007-07-10
  • 打赏
  • 举报
回复
Set Rs=Server.CreateObject("ADODB.Connection")
query="select xm from xinxi where xm='"+xm+"'"
Rs.Open query,Con,1,3

改成

Set Rs=Server.CreateObject("ADODB.recordset")
query="select xm from xinxi where xm='"+xm+"'"
Rs.Open query,Con,1,3
hookee 2007-07-10
  • 打赏
  • 举报
回复
Con.Open "File Name=C:\Inetpub\wwwroot\shopping\data\db.udl" '要确保Con打开
...
query="select * from xinxi where xm='" & xm & "'"

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧