see my error in jave (aamir.java [19:1] package oracle.jdbc.driver does not exist) [message #207923] |
Thu, 07 December 2006 06:31 |
mfa786
Messages: 210 Registered: February 2006 Location: karachi
|
Senior Member |
|
|
hi master
sir i am using oracle 9i and netbeans i have problem in connection
sir see my class
import java.sql.*;
public class aamir {
public aamir() {
DriverManager.registerDriver
(new oracle.jdbc.driver.OracleDriver()); --(error in this line)
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@fahim:1521:aamir","muhammad","mfa786");
// @machineName:port:SID, userid, password
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
stmt.close();
}
}
and this error
aamir.java [19:1] package oracle.jdbc.driver does not exist
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
^
1 error
Errors compiling aamir.
===========
sir please give me idea how i connect the oracle with natbeans
thank'k
aamir
|
|
|