这个update为什么失败?

BrightEye 2002-05-11 11:33:10
两个表:
a部分字段
字段1 字段2 字段3 字段4 字段5 字段6 字段7
number actfee shdfee payee feedat paid month 'actfee,shdfee是数字型,feedat是日期型,其他为文本型.
b部分字段
字段1 字段2
number f_id 'number为文本型,f_id为文本形.
现在我要更新表a的记录.我写了这个语句
strSQL="update a set actfee=shdfee,payee='sysop',feedat='"&now()&"',paid='Y' where b.f_id='48' and a.number=b.number and a.month<'0204'"
rs.open strSQL,conn,2,2 '11行
提示以下错误:
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e10'
参数不足,期待是2.
11行有错误.
我确信没有权限问题,问题出在哪儿?
...全文
77 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
BrightEye 2002-05-11
  • 打赏
  • 举报
回复
搞定了.感谢两位高人.给分!
ChinaOk 2002-05-11
  • 打赏
  • 举报
回复
strSQL="update a,b set actfee=shdfee,payee='sysop',feedat='"&now()&"',paid='Y' where b.f_id='48' and a.number=b.number and a.month<'0204'"
ChinaOk 2002-05-11
  • 打赏
  • 举报
回复
strSQL="update a,b set actfee=shdfee,payee='sysop',feedat='"&now()&"',paid='Y' where b.f_id='48' and a.number=b.number and a.month<'0204'"
BrightEye 2002-05-11
  • 打赏
  • 举报
回复
to freezwy(网络自由人):
我试了,不行.
to ChinaOK(授人以鱼,不如授人以渔) :
都试过了,不行呀!
ChinaOk 2002-05-11
  • 打赏
  • 举报
回复
因为是update,不返回记录集,
所以换成这个试试

set rs=Conn.execute(strSQL)
这样就不用先第一rs为recordset对象了
freezwy 2002-05-11
  • 打赏
  • 举报
回复
你用的什么数据库,如果是ACCESS的或,日期要加#的。
feedat=#"&now()&"#
同时建议使用3的打开方式
rs.open strSQL,conn,1,3

28,409

社区成员

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

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