I cannot update an Access DB using JDBC. This is my small test program: import java.sql.*; import java.io.*; public class testdb { public static void main (String args[]) throws Exception{ String user = "admin"; String password = ""; String url = "jdbc dbc:MyAccessDSN"; Connection myConnection; Statement myStatement; ResultSet myResultSet;
Are you getting an error or the update is just not working.? Again what version of the JDBC are you using? MS Access may not support some of the constructs you have in your code. ------------------ Bosun SCJP for the Java� 2 Platform
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
If the problem is simply that it is not updating, try closing the db resources or performing a select on the same connection after you perform the update. I've never had the problem myslef, but ACCESS seems to have a problem commiting updates without an extra "push" Dave
Patrick Dung
Greenhorn
Joined: Dec 09, 2001
Posts: 4
posted
0
it seems that i have problem when i use myResultSet.commit();
I believe that access does not support transactions(or it could be that some underlying ODBC drivers don't support it). So you can't use commit/rollback, but only the default autocommit. does your program throw a SQLException? if so, what was the error message? if not, what, specifically, is the "problem" that you mentioned? Jamie
Patrick Dung
Greenhorn
Joined: Dec 09, 2001
Posts: 4
posted
0
Sorry, the source code I post don't has problem. I've forget to put the resultset.commit() to the source code I post. So, I ask when to use resultset.commit() in the following post. And you answered my question.