怎样知道update以后真正有没有字段被更改?

chenzengxi 2003-02-24 04:43:20
conn.execute("update config set todaynum=0 where id=10")
if (?????) 'config的id=10的字段被改了

我不想再去select... 求解.
...全文
71 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lovelxj 2003-02-24
  • 打赏
  • 举报
回复
<%@ TRANSACTION = Required %>
'第一行用以上的脚本
'创建事务性脚本
conn.execute("update config set todaynum=0 where id=10")
response.write "数据修改成功"
只要数据库操作成功,就会有报告
flyinweb 2003-02-24
  • 打赏
  • 举报
回复
conn.execute(commandText,[RecordAffected],[options])
其中,RecordAffected是可选的,当执行完成后,数据提供者返回的受到影响的记录数目
逍遥小贼 2003-02-24
  • 打赏
  • 举报
回复
只要执行了,一般就是更新了,除非出错,有没有出错可以用error来判断
on error resume next
conn.execute("update config set todaynum=0 where id=10")
if err.num<>0 then
response.write Err.Description
end if
fenlin 2003-02-24
  • 打赏
  • 举报
回复
conn.execute("update config set todaynum=0 where id=10")
response.write "数据修改成功"
BrightEye 2003-02-24
  • 打赏
  • 举报
回复
on error resume next
conn.execute("update config set todaynum=0 where id=10")
if err.num<>0 then
response.write Err.Description
end if

28,391

社区成员

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

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