查看: 1027|回复: 3
|
请问这段sql statement有问题吗?
[复制链接]
|
|
?ex.Message
"Syntax error in UPDATE statement."
"UPDATE account_profile SET CUSID = 'CUS1000002', Total = '458.00', Outstanding = '458.00', Ref_num = '408', Date = '5/11/2006', Description = 'DN 002' WHERE CPRID = 'CPR1000010'"
我确认我的field name没有写错。。 但为何update不到呢? |
|
|
|
|
|
|
|
发表于 10-5-2006 12:29 PM
|
显示全部楼层
|
|
|
|
|
|
|
楼主 |
发表于 10-5-2006 01:19 PM
|
显示全部楼层
我试过了不可以。。。。 为何?
strSQL = "UPDATE credit_payment_record SET CUSID = '" + CUSID + "', Total = '" + Total + "', Outstanding = '" + Total + "', Ref_num = '" + Ref_num + "', Date = '" + payment_date + "', Description = '" + desc + "' WHERE CPRID = '" + CPRID + "'"
还是
strSQL = "UPDATE credit_payment_record SET CUSID = '" + CUSID + "', Total = " + Total + ", Outstanding = " + Total + ", Ref_num = '" + Ref_num + "', Date = '" + payment_date + "', Description = '" + desc + "' WHERE CPRID = '" + CPRID + "'" |
|
|
|
|
|
|
|
楼主 |
发表于 10-5-2006 01:30 PM
|
显示全部楼层
行了。。 问题出在date 这个field name, 我改去 payment_date就okie了 |
|
|
|
|
|
|
| |
本周最热论坛帖子
|