当通过 java 调用时,sql lite 中的更新语句返回什么样的值?是 boolean 值吗?
我正在尝试更新几行并想获取它是否正常工作或抛出异常。
提前致谢
最佳答案
试试这个:
1) 您正在执行更新查询的方法:
public boolean updateTable() {
boolean isSuccessFul = false;
// Prepare the statements and the connections
try {
// Execute the update
isSuccessFul = true;
} catch(Exception e) {
// Handle it
} finally {
return isSuccessFul;
}
}
关于java - sqlite中update语句的返回值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13393114/