try {
rs=db.executeQuery("select * from A where flag=1 ";);
....
db.execute("update A set flag=0 where flag=1");
...我想先取出某些满足条件的数据,然后把标志位置为0
可是A数据表里并没有被设置成0
这是为什么?求教
rs=db.executeQuery("select * from A where flag=1 ";);
....
db.execute("update A set flag=0 where flag=1");
...我想先取出某些满足条件的数据,然后把标志位置为0
可是A数据表里并没有被设置成0
这是为什么?求教
DB db = new DB();
db.OpenConnection();
try{
String strSQL="update A set f=2 where f=1";
db.execute(strSQL);
}catch (Exception ex) {
ex.printStackTrace();
}finally {
db.dbclose();
}
}即使是一个操作也不行?为什么啊
2,看看Connection里的getAutoCommit是不是返回true,否则要设为true或手工Connection.commit()一下
先把自动事物关掉
自己COMMIT和ROLLBACK