With the code below I am supposedly opening a readonly connection to a database.
The problem is that I can actually update this database!!!! I must be missing something very stupid
or else the setReadOnly method does not do its job. I have also browsed the forum for a similar problem
but nobody seems to have encountered such a thing.
Any help would be greatly appreciated.
if (driverType.equals("ODBC")) { //Use ODBC Driver
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
url = "jdbc:odbc:"+sourceName;
}
dbConnection = DriverManager.getConnection(url,user,password);
dbConnection.setReadOnly(true);