Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDBC Drivers to access from Oracle on Unix environment

843854Sep 30 2002 — edited Oct 8 2002
hi,

Iam able to run my java application to access the data from the Oracle (8.1.7)using JDBC-ODBC bridge drivers on my Windows environment,but when i tried to execute the same program on Unix(I used same DSN)enivronmentit is giving an 'SQLException:NO Suitable Driver'.
Iam using JDK1.2.2 version and have got Oracle 8.0.5 client on my PC.Iam using WindowsNT workstation and Unix on the same machine.

This is the program Iam using in both Windows and Unix.

import java.sql.*;
import java.util.*;
import java.math.*;

public class db11
{
public static void main(String[] args)
{
String url="jdbc:odbc:dsn_name";
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection dbconn=DriverManager.getConnection(url,"scott","tiger");
System.out.println("Connection OK");

}
catch(ClassNotFoundException c1)
{
System.out.println(c1.toString());
}
catch(SQLException c2)
{
System.out.println(c2.toString());
}
}
}

Can anyone help me out how to run the same in Unix.Iam able to ru my other Java applications with out database applications.

Regards
Rao
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 5 2002
Added on Sep 30 2002
17 comments
461 views