Re: A JDBC driver problem

From: Jason Stewart <jstewart(at)rtl(dot)org>
To: "Ahmed Huwait" <huwait(at)cs(dot)purdue(dot)edu>, "JDBC Group" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: A JDBC driver problem
Date: 2002-09-03 14:31:24
Message-ID: 5.1.1.6.0.20020903103009.0242ae50@mail.rtl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)jdbc(dot)driver(dot)OracleDriver(at)20dcd9
>while the line:
>System.out.println(new oracle.jdbc.driver.OracleDriver());
>prints: oracle(dot)jdbc(dot)driver(dot)OracleDriver(at)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2002-09-03 16:03:48 Re: problem in using DatabaseMetaData getColumns()
Previous Message Dave Cramer 2002-09-03 09:29:47 Re: 7.3 support?