I am trying to access Oracle 8I from java and I don't want to use ODBC to
connect. What are the issues and which driver is best for this. I have heard
that Oracles Thin Client is best. I am new to this. I did try to connect
and got a message a saying "no suitable driver"
Class.forName("oracle.jdbc.driver.OracleDriver");
Any help is most appreciated.
Patrick
06-01-2000, 08:26 AM
Rob
Re: JDBC and Oracle
Hi Patrick,
This is one way:
// load the driver
DriverManager.registerDriver(
new oracle.jdbc.driver.OracleDriver());
BTW I'm also very new to oracle/JDBC but I thought this might help
Rob
"Patrick" <programwiz@aol.com> wrote:
>
>Hello,
>
>I am trying to access Oracle 8I from java and I don't want to use ODBC to
>connect. What are the issues and which driver is best for this. I have heard
>that Oracles Thin Client is best. I am new to this. I did try to connect
>and got a message a saying "no suitable driver"
>
> Class.forName("oracle.jdbc.driver.OracleDriver");
>
>Any help is most appreciated.
>
>Patrick
06-02-2000, 01:42 AM
Giri
Re: JDBC and Oracle
Hi Patrick
Few more additions to what u have written. the correct syntax for the Create
connection part is
default port for thin is 1521. so u can use this
Connection conn =
DriverManager.getConnection (
"jdbc:oracle:thin:@<server_name>:1521:<database service name at the
DB server>",
"scott", "tiger");
The CLASPATH setting is right. but, in case u want a driver which supports
JDBC2.0, then u have to get a zip file called classes12.zip from oracle site.
the correct CLASSPATH setting is <oracle_home>\ora81(for 8i)\jdbc\lib\classes12.zip
Thin driver is the best driver, in case u have no plans of changing the database
to a different vendor or do not have different distributed databases(thin
works only with Oracle), then thin is the best choice. But, in case u have
different databases, then u can go for a driver called IDS driver which is
a type3 driver.
Hope this helps
Giri
"Rob" <robx@fsmail.net> wrote:
>
>Hi Patrick,
>
>This is one way:
>
> // load the driver
> DriverManager.registerDriver(
> new oracle.jdbc.driver.OracleDriver());
>
> // create the connection
> Connection conn =
> DriverManager.getConnection (
> "jdbc:oracle:thin:db-new.gsi.de:1521:hadp",
> "scott", "tiger");
>
>You need to have the JDBC Drivers in your CLASSPATH
>e.g. /path/to/classes111.zip
>have you got this in your CLASSPATH ??
>
>You may find this site very useful:
>
> http://www-wnt.gsi.de/oragsi/
>
>BTW I'm also very new to oracle/JDBC but I thought this might help
>
>Rob
>
>"Patrick" <programwiz@aol.com> wrote:
>>
>>Hello,
>>
>>I am trying to access Oracle 8I from java and I don't want to use ODBC
to
>>connect. What are the issues and which driver is best for this. I have
heard
>>that Oracles Thin Client is best. I am new to this. I did try to connect
>>and got a message a saying "no suitable driver"
>>
>> Class.forName("oracle.jdbc.driver.OracleDriver");
>>
>>Any help is most appreciated.
>>
>>Patrick
>
"Patrick" <programwiz@aol.com> wrote:
>
>Hello,
>
>I am trying to access Oracle 8I from java and I don't want to use ODBC to
>connect. What are the issues and which driver is best for this. I have heard
>that Oracles Thin Client is best. I am new to this. I did try to connect
>and got a message a saying "no suitable driver"
>
> Class.forName("oracle.jdbc.driver.OracleDriver");
>
>Any help is most appreciated.
>
>Patrick