Search code examples
javams-accessucanaccess

Why do I recover a deleted record with UCanAccess?


I have been using UCanAccess to use Access databases my problem is when i want to delete a recor this returns automatically. For example if i have:

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)


Solution

  • I found the problem, I was using data type OLE to save images simple sentences doesn't works so the way to delete a row with OLE field is creating Database and Table objects from java. It works.