简单execute问题,在线急等!

lishan200012 2006-09-26 02:46:26
请问conn.execute("update table set col1=1 wehre col2=col2")如何修改才能正常使用!
...全文
100 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
飘零雾雨 2006-09-26
  • 打赏
  • 举报
回复
col2为数字:
conn.execute("update table set col1=1 wehre col2="&col2"")
col2为字符串:
conn.execute("update table set col1=1 wehre col2='"&col2"'")
lishan200012 2006-09-26
  • 打赏
  • 举报
回复
小弟已搞定,谢谢各位。
conn.execute("update table set col1=1 wehre col2='"&col2"'")
rob123 2006-09-26
  • 打赏
  • 举报
回复
conn.execute("update table set col1=1 where col2=2")
楼主是这个意思吧?
北京不不 2006-09-26
  • 打赏
  • 举报
回复
conn.execute("update table set col1=1 wehre col2=col2")
如果col2为变量。。则应为
conn.execute("update table set col1=1 wehre col2="&col2&"")
cjl8882000 2006-09-26
  • 打赏
  • 举报
回复
楼主想干嘛??
把所有的COL1全部替换成1??

首先 第一个 就是 你的COL1是整型的变量嘛?
如果不是就要写成CLO1='1'

还有 你后面的COL2=COL2这句干嘛的? 如果你要替换全部 不如写成 1=1
李向荣 2006-09-26
  • 打赏
  • 举报
回复
你具体要做什么,那个表,列是那些,要更新什么,条件是什么

28,391

社区成员

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

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