cannot select db in jdbc url
Posted by: info
Date: May 20, 2005 11:28PM

hi to all,

when i call getConnection() using the following code

    DBConnector connector = DBConnector.getInstance();
    Connection conn = null;
    try {
      conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/", "group", "");
      //conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/xns" , "group", "");
    } catch(Exception e) {
      // TODO: add logging here

i connect to the database, but if i use the getConnection() line that is commented, i get NPE for the Connection object.

this means all my queries have to be in the form

SELECT something FROM database.table;

any ideas ?

MySQL = v4.1.10-nt
JDBC = latest GA -->

kind regards,


Options: ReplyQuote

Written By
cannot select db in jdbc url
May 20, 2005 11:28PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.