Solved

Connectivity to Oracle

Posted on 2004-09-06
3
193 Views
Last Modified: 2010-04-01
Hi all, i have expereicen in conecting to IBM Db2, but not oracle,

Can anyone share me the way to connect to oraacle databse.

TQ.

try {

Class.forName("what is the name").newInstance();
Connection conn = DriverManager.getConnection("what is the path");

}

thank you
0
Comment
Question by:spiderman19
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 250 total points
ID: 11987958
0
 
LVL 11

Expert Comment

by:sompol_kiatkamolchai
ID: 11987975
Here is another example

>>Class.forName("what is the name").newInstance();
oracle.jdbc.driver.OracleDriver
>>Connection conn = DriverManager.getConnection("what is the path");
jdbc:oracle:thin:@(description=(address=(host=database_ip)(protocol=tcp)(port=1521))(connect_data=(sid=database_instance_name)))

But make sure you have OracleDriver include to classpath.
0
 
LVL 92

Expert Comment

by:objects
ID: 11992783
thanks mate :)
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem with Pie chart in Jsp 20 222
Apache server configuration 7 87
report generation frameworks 1 69
How to set default webapp for host 6 47
IT certifications are a concrete representation of continual learning on the part of the candidate.  Continual learning is necessary for the long term success of an IT professional, but are IT certifications the right path for you?
Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question