作者qrtt1 (隐者)
看板java
标题Re: [JSP ] 我想请问一下资料更新的问题
时间Thu May 4 18:06:35 2006
※ 引述《imprincess (卷卷儿~*)》之铭言:
: 我这个程式是要编辑某id跟所tel
: 这两个的资料型态都是文字
: 如果我写了...
: String sql = "update memTab set " +
: "tel='" + tel + "', " +
: "where id='" + id + "';" ;
: statement.executeUpdate(sql);
: 会显示[Microsoft][ODBC Microsoft Access Driver] UPDATE 陈述式的语法错误。
: 而我若是这样写...
: String sql = "update memTab set tel=? where id=?" ;
: statement.executeUpdate(sql);
: 会显示
: [Microsoft][ODBC Microsoft Access Driver]COUNT 栏位不正确
: 然後资料库的资料就都不会被更新...
: 请问有人知道为什麽嘛?
: 请教教我...谢谢...
count栏位有没有什麽预设条件@"@
不然就是你真写错了...
btw. 您到底是用statement还是prepared statement @@?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 163.26.34.20