作者imprincess (卷卷儿~*)
看板java
标题[JSP ] 我想请问一下资料更新的问题
时间Thu May 4 16:26:32 2006
我这个程式是要编辑某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 栏位不正确
然後资料库的资料就都不会被更新...
请问有人知道为什麽嘛?
请教教我...谢谢...
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.122.24.137