when i run my code i get the following error:-
code:-
import java.io.* ;
import java.sql.*;
import java.util.*;
import oracle.sql.*;
import oracle.jdbc.*;
class javadbconn{
public static void main(
String arg[]) throws java.io.IOException
{
Connection connection = null;
try {
// Load the
JDBC driver
Class.forName("oracle.jdbc.driver.OracleDriver");
// Create a connection to the database
connection =
DriverManager.getConnection("jdbc : oracle : oci8:@samit:1521:asid","scott","tiger");
} catch (ClassNotFoundException e) {
// Could not find the database driver
e.printStackTrace();
} catch (SQLException e) {
// Could not connect to the database
e.printStackTrace();
}
}
}
error:-
java.sql.SQLException: ORA-06401: NETCMN: invalid driver designator
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:184)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1774)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:462)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:353)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:457)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:332)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at javadbconn.main(javadbconn.java:32)
the client side oracle version is as follows:-
Oracle9i Enterprise Edition Release 9.0.1.5.1 - Production
With the Partitioning option
JServer Release 9.0.1.4.0 - Production
[ October 13, 2004: Message edited by: sai Narayan ]
[ October 13, 2004: Message edited by: sai Narayan ]