Two Laptop Bag*
The moose likes JDBC and the fly likes New to JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "New to JDBC " Watch "New to JDBC " New topic
Author

New to JDBC

nirail rail
Ranch Hand

Joined: Nov 14, 2003
Posts: 39
Dear Sir,

Are Oracle JDBC Driver, server Specific (WIN NT)
THAT IS ONE FOR WEBSPHERE AND ANOTHER FOR WEBLOGIS IF YES
PLS TELL ME WHICH DRIVERS SHOULD I USE FOR WEBSPHERE 3.5.7 TO CONNECT ORACLE 8i/9i
HOW TO INSTALL DRIVERS?
IF I HAVE APPLICATION SERVER ON ONE M/C AND ORACLE ON ANOTHER WHERE SHOULD I INSTALL DRIVERS?
WHAT HAS TO BE ENTERED IN CLASSPATH(WIN NT)?
WHAT HAS TO GO IN CLASS.FORNAME(--------------------);

PLS HELP
[ July 07, 2004: Message edited by: Bear Bibeault ]
Samuel Johnson
Greenhorn

Joined: Apr 20, 2004
Posts: 5
JDBC Driver are not Application "server" specific. It is, however, database server specific. Click here and get yourself an Oracle JDBC Driver (classes12.jar).

Add classes12.jar into your CLASSPATH and try the following code where xxx.xxx.xxx.xxx is the IP of your Oracle Server

String url = "jdbc racle:thin:@xxx.xxx.xxx.xxx:1521 racleSID";
String userId = "";
String password = "";
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection(url, userId, password);
Statement stmt = con.createStatement();
//==================
} catch (Exception e) {

}
Samuel Johnson
Greenhorn

Joined: Apr 20, 2004
Posts: 5
Sorry. url should be:


[edited to disable smilies]
[ July 07, 2004: Message edited by: Jeanne Boyarsky ]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Hint: try : instead of 'colon's to avoid smilies

:o


Dave
nirail rail
Ranch Hand

Joined: Nov 14, 2003
Posts: 39
Dear Samuel,

Thanks sir, i will try it out and get back to you

Thanks once again for quick reply
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

Or you could check the "disable smilies" checkbox at the bottom of the post window. It's in the options section (underneath the instant UBB code section.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: New to JDBC
 
Similar Threads
jdbc problems
Websphere 3.5.5 Migration to Websphere 5.1
Which driver to use
which JDBC driver to use
How to connect Oracle with Java