How to connect Java application with Oracle Database using JDBC?

D

dilip

Hi friends ,
Myself dilip while learning java, JDBC:ODBC bridge to connect java
application with Ms-Access we easily do using
DriverManager,Connection,Statement,PreparedStatement,ResultSet,
ResultSetMetaData.
But when i try to connect java program to Oracle it's gives a number
of errors.please ,If anyone has appropriate solution to this provide
me.
Thanks .
Dilip Kumar
http://www.intelcs.com/IT-Companies/
 
D

DRS.Usenet

public OracleConnection connect() throws Exception {
String connectString =
"jdbc:eek:racle:thin:mad:some.server.name:someportnumber:somedatabasename";
OracleDriver driver = new OracleDriver();
driver = null;
Class.forName ("oracle.jdbc.driver.OracleDriver");
con = (OracleConnection)
DriverManager.getConnection(connectString,userid, password);
con.setAutoCommit(false);
return con;
}

You need to find a copy of classes12.jar.

--Dale--
 
L

Lew

public OracleConnection connect() throws Exception {
String connectString =
"jdbc:eek:racle:thin:mad:some.server.name:someportnumber:somedatabasename";
OracleDriver driver = new OracleDriver();
driver = null;
Class.forName ("oracle.jdbc.driver.OracleDriver");
con = (OracleConnection)
DriverManager.getConnection(connectString,userid, password);
con.setAutoCommit(false);
return con;
}

You need to find a copy of classes12.jar.

Make that ojdbc14.jar at a minimum. ojdbc5.jar and ojdbc6.jar are also available.

<http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_111060.html>

It's not good to recommend obsolete tech.
 
D

DRS.Usenet

Make that ojdbc14.jar at a minimum. ojdbc5.jar and ojdbc6.jar are also available.

<http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/...>

It's not good to recommend obsolete tech.

But it's okay as long as folks like you are around to keep me honest!

Thanks, by the way, since I was having a memory issue with TTCItem and
I'll bet more current Oracle code will have fixed that bug... on my
way to your link right now to see if that's the case.

--Dale--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top