为什么我要用 UCanAccess 恢复已删除的记录?
Why do I recover a deleted record with UCanAccess?
我一直在使用 UCanAccess 来使用 Access 数据库,我的问题是当我想自动删除记录时 returns。
例如,如果我有:
Table Names
Id Name
1 Jessy
2 Abraham
String deleteQuery = "DELETE From Names where Id =?";
PreparedStatement pstm = con.getConnection().prepareStatement(deleteQuery);
pstm.setInt(1, 1); // "id" is type numeric
pstm.executeUpdate();
pstm.close();
it will works And then if i open the database the recor will be there!
that's my problem. (i hide the connection code but i have it)
尽量使用Access提供的压缩功能。在“工具”菜单上,指向“数据库实用程序”,然后单击“压缩和修复数据库”。这可能会有所帮助。
之后你会提交吗?如果不是并且 autocommit=false,那就去做吧。
我发现了问题,我使用数据类型 OLE 来保存图像简单的句子不起作用所以删除带有 OLE 字段的行的方法是从 [=12= 创建数据库和 Table 对象].有效。
我一直在使用 UCanAccess 来使用 Access 数据库,我的问题是当我想自动删除记录时 returns。 例如,如果我有:
Table Names
Id Name
1 Jessy
2 Abraham
String deleteQuery = "DELETE From Names where Id =?";
PreparedStatement pstm = con.getConnection().prepareStatement(deleteQuery);
pstm.setInt(1, 1); // "id" is type numeric
pstm.executeUpdate();
pstm.close();
it will works And then if i open the database the recor will be there! that's my problem. (i hide the connection code but i have it)
尽量使用Access提供的压缩功能。在“工具”菜单上,指向“数据库实用程序”,然后单击“压缩和修复数据库”。这可能会有所帮助。
之后你会提交吗?如果不是并且 autocommit=false,那就去做吧。
我发现了问题,我使用数据类型 OLE 来保存图像简单的句子不起作用所以删除带有 OLE 字段的行的方法是从 [=12= 创建数据库和 Table 对象].有效。