日期:2014-05-17  浏览次数:20868 次

遇到郁闷的问题,关于update
今天在写程序的时候,遇到一个郁闷的问题,关于UPDATE的,相信自己的写法是正确的,但就是要报错.数据结构也查了又查,字符型啊,怎么着也应该可以更新才对啊.
语句是这样:
conn.execute( "Update   UserTable   set   Password= 'xxxxx '   where   ID=8 ")
就测试的上面这句,提示错误

Microsoft   JET   Database   Engine   错误   '80040e14 '  

UPDATE   语句的语法错误。


用的ACCESS数据库,usertable表中,Password用的是字符型50长.
找了下没发现错误,只有一条一条的更新了,于是用下面这段
sql= "select   *   from   usertable   where   id=8 "
rs.open   sql,conn,3,3
rs( "password ")= "xxxxx "
rs.update

更新成功!

大侠们,那里错了啊,现在郁闷得很呀.麻烦知情者告知.


------解决方案--------------------
conn.execute( "Update [UserTable] set [Password]= 'xxxxx ' where ID=8 ")
------解决方案--------------------
conn.execute( "Update UserTable set [Password]= 'xxxxx ' where ID=8 ")