Home » Developer & Programmer » JDeveloper, Java & XML » Problem in connecting ORACLE with JDBC
Problem in connecting ORACLE with JDBC [message #91084] Thu, 28 March 2002 08:13 Go to next message
sajith
Messages: 2
Registered: March 2002
Junior Member
I use win 200 Professional with Oracle 8i
After loading the "sun.jdbc.odbc.JdbcOdbcDriver"
I tried to get the connection using DriverManage.getConnection("jdbc:odbc:datasorse");
But this method never returns and i don't get a Connection Object.
Code get's stuck at that point
What should I do
Re: Problem in connecting ORACLE with JDBC [message #91085 is a reply to message #91084] Thu, 28 March 2002 09:46 Go to previous messageGo to next message
Jeyakumar
Messages: 3
Registered: January 2002
Junior Member
Try this, you may have to initialize the connection.

Connection con = null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection(url,name,pass);
}
Re: Problem in connecting ORACLE with JDBC [message #91362 is a reply to message #91084] Mon, 29 July 2002 04:53 Go to previous message
gnoon
Messages: 5
Registered: July 2002
Junior Member
You should set the CLASSPATH to point to the rt.jar file because the sun.jdbc.odbc.JdbcOdbcDriver class is in this file.
Previous Topic: Re: Problem while connecting Oracle with JDBC Thin Driver on Win 98
Next Topic: Re: Problem while connecting Oracle with JDBC Thin Driver on Win 98
Goto Forum:
  


Current Time: Fri Nov 22 19:59:26 CST 2024