This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes a q about deleting record(s) using JDBC:ODBC and Microsoft Access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "a q about deleting record(s) using JDBC:ODBC and Microsoft Access" Watch "a q about deleting record(s) using JDBC:ODBC and Microsoft Access" New topic
Author

a q about deleting record(s) using JDBC:ODBC and Microsoft Access

Mahmoud Hadad
Ranch Hand

Joined: Jan 09, 2006
Posts: 67
hi evreyone,
when i try to delete a record or records using JDBC:ODBC bridge the record does not get deleted till i make a duplicate of that statement(as i think it might be because Access makes a confirmation before it deletes any record ) and the executeUpdate method returns the row count of the selected records. anyway when i was deleting from my JTable i first deleted the record from my resultset that was obtained by a SELECT statement in my java pp then deleted it from the DB so it got deleted right away iside my java application, so does deleting record(s) from a resultset that is retrieved using a Statement object generates a DELETE SQL Statement to the db ?
[ October 07, 2006: Message edited by: Mahmoud Hadad ]
Wei Dai
Ranch Hand

Joined: Jun 22, 2005
Posts: 86
Try con.commit() function. It's a known issue of MS Access with jdbc-odbc bridge driver
 
Consider Paul's rocket mass heater.
 
subject: a q about deleting record(s) using JDBC:ODBC and Microsoft Access
 
Similar Threads
Deleting/adding records.
URLyBird 1.1.3 - should delete unlock a record automatically ?
Physically delete the record
cookies/deleting
NX : throwing RecordNotFoundException?