This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Oracle 8I and JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Oracle 8I and JDBC" Watch "Oracle 8I and JDBC" New topic
Author

Oracle 8I and JDBC

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I recently installed Oracle 8i with all the standard defaults. I created a database with the name local2.db, which gave me a SID of local2. When I start it up it starts as LOCAL2.
When trying to connect to it from Java, what should the values of driver and url be set to? I'm on the local machine.
Thanks.
String driver, url;
driver = ?;
url = ?;
Class.forName(driver);
Connection conn = DriverManager.getConnection (url ,"account","password");

[This message has been edited by Chris Thibault (edited March 12, 2001).]
[This message has been edited by Chris Thibault (edited March 12, 2001).]
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
From http://technet.oracle.com
DriverManager.getConnection("jdbc racle:thin:@<mc-name>:<port-no>:<sid>","scott", "tiger");
where mc-name is the machine name

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle 8I and JDBC
 
Similar Threads
Error when i connect to sql
Date Type
Network Adapter
XML and Oracle
Suggest a Project