I am trying to write a
java program to connect to an Oracle server and return a record set..
I keep getting the following error..
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified..
here is the code I am trying to get to work..
import oracle.sql.*;
import oracle.jdbc.driver.*;
protected void loadTestDataDB(ArrayList CIFList)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch (ClassNotFoundException e)
{
logError("Error: Failed to load
JDBC DBC Driver!");
}
try
{
DriverManager.registerDriver( new oracle.jdbc.driver.OracleDriver()) ;
Connection con = DriverManager.getConnection("jdbc
dbc:thin:@172.25.5.70:1521:aixedev","user","password");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM agents");
...
...
... etc
What am I doung wrong.. the oracle client is installed on the machine and i can connect to the above with sqlplus..
Any help would be apreciated..