Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: JDBC and Oracle connection

Re: JDBC and Oracle connection

From: Gary SMITH <Gary.Smith_at_cern.ch>
Date: 1997/11/10
Message-ID: <3466D228.5F0E0347@cern.ch>#1/1

Terje,

put a ":" between the driver name (oci7) and the host string. e.g.:

"jdbc:oracle:oci7:@t:host:DB"

Regards

Terje A Bergesen wrote:

> Hi.
>
> I am not an Oracle expert, but am currently playing a bit with
> Java and JDBC against Oracle. I have downloaded the new JDBC
> drivers from Oracle, and am trying to connect to it. Oracle is
> at 7.3.something.
>
> Connecting to the Oracle with sqlplus is usually done with:
> sqlplus user/pass_at_t:host:DB
>
> I then try to use the the JDBC/OCI drivers from Oracle, and
> I am a bit puzzeled as to what connection string I am supposed
> to use. Anything seems to fail...
>
> I have tried variations of
> Connection conn = DriverManager.getConnection (
> "jdbc:oracle:oci7_at_t:host:DB", user, password);
>
> and
>
> Connection conn = DriverManager.getConnection (
> "jdbc:oracle:oci7_at_host:DB", user, password);
>
> but none of them seems to work. I get an oracle error
> java.sql.SQLException: ORA-06401: NETCMN: invalid driver designator
>
> I do initialize the drivers, my example is straight from
> the JdbcCheckup.java example.
>
> I am probably just ignorant here, but would be thankful for
> any help.
>
> --
> ----------------------------------+-------------------------------------
> - Terje A. Bergesen | The UNIX Guru's View of Sex: -
> ----------------------------------+ -
> - Say NO to inferior technology. | # unzip ; strip ; touch ; finger ; -
> - Say NO to MS Internet Explorer. | mount ; fsck ; more ; yes ; -
> - Say NO to MS Visual J++ | umount; sleep -

--
*************************
Gary Smith
CERN, Geneva, Switzerland
Email: Gary.Smith_at_cern.ch
Tel:   +41 22 7678944
*************************
Received on Mon Nov 10 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US