2 messages in com.mysql.lists.win32RE: java / mysql / connection| From | Sent On | Attachments |
|---|---|---|
| Madhukar K | 07 Jun 2002 05:25 | |
| Venu | 07 Jun 2002 11:33 |
| Subject: | RE: java / mysql / connection![]() |
|---|---|
| From: | Venu (ve...@mysql.com) |
| Date: | 06/07/2002 11:33:48 AM |
| List: | com.mysql.lists.win32 |
-----Original Message----- From: Madhukar K [mailto:madh...@mylibnet.org] Sent: Friday, June 07, 2002 5:26 AM To: myo...@lists.mysql.com Cc: win...@lists.mysql.com Subject: java / mysql / connection
hi all,
i am trying to connect to myodbc (MySql) using JDBC:ODBC. it is throwing an exception "Information type out of range ". heres the code.
myCon = DriverManager.getConnection(url,"","");
It should be something like this, by assuming the MyODBC DSN is "myodbc3-test"
try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); } catch (Exception E) { System.err.println("Unable to register the bridge"); E.printStackTrace(); }
try { String Server = new String("jdbc:odbc:myodbc3-test"); String Uid = new String("venu"); String Pwd = new String("venu");
Connection conn = DriverManager.getConnection(Server,Uid,Pwd); .. .. }
Regards, Venu
-- For technical support contracts, go to https://order.mysql.com __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Venu <ve...@mysql.com> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer /_/ /_/\_, /___/\___\_\___/ California, USA <___/ www.mysql.com




