Re: A JDBC driver problem

Поиск
Список
Период
Сортировка
От Jason Stewart
Тема Re: A JDBC driver problem
Дата
Msg-id 5.1.1.6.0.20020903103009.0242ae50@mail.rtl.org
обсуждение исходный текст
Ответ на A JDBC driver problem  ("Ahmed Huwait" <huwait@cs.purdue.edu>)
Список pgsql-jdbc
It looks like you are using the Oracle driver. You should be using the
Postgresql Driver :). I could probably help you with loading the Postgres
driver.

Jason

At 08:08 PM 8/30/2002 -0500, Ahmed Huwait wrote:
>I'm developing a java program using jdbc, this program is supposed to be
>able to connect to any kind of database using its url, username, and
>password. What I did already, is to make it connect to oracle databse
>using the url:
><mailto:jdbc:oracle:thin:@oracle.cs.purdue.edu:1521:orb>jdbc:oracle:thin:@oracle.cs.purdue.edu:1521:orb
>and for driver registration I used:
>DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
>
>What I'm asking about is, how to get the suitable driver for a certain
>database using its url, & how can I register it so I can connect to the
>database?
>
>I used this line:
>
>Driver d =

>DriverManager.getDrivers("<mailto:jdbc:oracle:thin:@oracle.cs.purdue.edu:1521:orb>jdbc:oracle:thin:@oracle.cs.purdue.edu:1521:orb");

>
>
>it returns a driver, which appears -when u print it-
>as:      oracle.jdbc.driver.OracleDriver@20dcd9
>while the line:
>System.out.println(new oracle.jdbc.driver.OracleDriver());
>prints:        oracle.jdbc.driver.OracleDriver@5f5897
>
>but when I try to register the Driver d, the connection failed, cause of
>no suitable driver...
>
>can you help me with that?
>
>
>----------
>Ahmed Huwait
>Computer Science Department,
>Purdue University,
>West Lafayette, IN, USA.

Jason Stewart
Systems Administrator/Programmer
Right to Life of Michigan
Tel: (616)532-2300
Fax: (616)532-3461


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "David Wall"
Дата:
Сообщение: Re: setBlob loop performance?
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: problem in using DatabaseMetaData getColumns()