Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

I am writing successfully to a readonly connection!

843854May 10 2004 — edited May 10 2004
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);
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 7 2004
Added on May 10 2004
4 comments
538 views