jdbc i use two classes. in one class i create a datasource object and open a connection. in the other class i want to run a query using the open connection.
will the conn object in query class be able to run the query based on the connection opened by con in the DBManager class
posted 13 years ago
It should, as long as your DBConnection class returns a connection object. As it is now, it's not. Hav this method "getDBConnection()" in your DBConnection class return a connection object. It should not even compile the way you have it now.
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley