Apart from using a 'real' driver you should use a connection pool to access the database.
Opening the connection on every db access is very inefficient. Further you should explicitly close the Statements (see below) Are query and con instance or class variables ? > -----Urspr�ngliche Nachricht----- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Gesendet: Donnerstag, 7. Februar 2002 01:56 > An: [EMAIL PROTECTED] > Betreff: Multi-user problem > > //Open JDBC Connection (This occurs right after > getting the POST parameters): > try{ > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); > con = > DriverManager.getConnection("jdbc:odbc:sqaa","philg",""); > query = con.createStatement(); > } > catch (Exception exc) { > System.err.println("Error creating JDBC connection."); > System.err.println(exc.getClass().getName()); > System.err.println(exc.getMessage()); > thelper.fileServe(out,"c:/html/except.html"); > return; > } > > //Close database connection (this is the last thing done). > try{ if (query != null) { query.close(); } if (con != null) { > con.close(); } > } catch (Exception exc) { > System.err.println("Error closing database."); > System.err.println(exc.getClass().getName()); > System.err.println(exc.getMessage()); > thelper.fileServe(out,"c:/html/except.html"); > return; > } -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
