I am creating a
Java program that accesses a Database and so Far I have had no problems, but I have just realised that I need a "Multi-connect" architecture in my database rather than a perminant connection to the DataBase.
I did some research and found that once I closed the Database Link my ResultSet (I am using this to hold the data rather than an Array/Vector) closed as well, after some hunting I found that I needed to change my PreparedStatement line to read
---
PreparedStatement pstmt = conn.prepareStatement("SELECT * FROM " + tbl, ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE, ResultSet.HOLD_CURSORS_OVER_COMMIT);
---
But when I try to run this command I get this Error
---
Exception in
thread "main" java.lang.UnsupportedOperationException
at sun.jdbc.odbc.JdbcOdbcConnection.setHoldability(JdbcOdbcConnection.java:1698)
---
Apart from this my program is fully functional.
If anyone can give me an idea on why I am getting this result/How to fix it. then I would appreciate it.
My System
Linux - Debian 3.0 - Kernel 2.4.25
Windows XP
mySQl
MS Access
Java 1.4.2_02