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

Home -> Community -> Usenet -> c.d.o.server -> Re: A little help connecting to oracle from java. Anyone? Please!!? :-)

Re: A little help connecting to oracle from java. Anyone? Please!!? :-)

From: Paul Murray <pmurray_at_nospam.bigpond.com>
Date: Mon, 12 Aug 2002 04:47:20 +1000
Message-ID: <D5K59.4358$g9.15498@newsfeeds.bigpond.com>


"Simon Harvey" <noThanks_at_pdf.com> wrote in message news:3d554318_1_at_news.teranews.com...

> DSN Version:
> String connectionString = "

jdbc:oracle:thin:localhost:1521:daytonDSN";
>
> What I think is the Service Name version:
> String connectionString = "
> jdbc:oracle:thin:localhost:1521:dayton.homenet";
> also tried:
> String connectionString = " jdbc:oracle:thin:localhost:1521:DAYTON";

You have to get it juuuuust right:

String connectionString = " jdbc:oracle:thin:@localhost:1521:DAYTON";

Works fine. the @ with nothing in front indicates an anonymous user, but you generally put the uid and passwd into the createConnection() method call. The full syntax is

String connectionString = "
jdbc:oracle:thin:SCOTT/TIGER_at_localhost:1521:DAYTON";

but no-one uses it AFAIK.



Guns don't kill people,
people with guns kill people. Received on Sun Aug 11 2002 - 13:47:20 CDT

Original text of this message

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