hi members
i make a java application to connect to oracle database in netbeans 6.5 but it do not work and give me error plz help me to solvve this error
the code:
package javaapplication4;
import java.sql.*;
public class Main
{
public static void main(String[] args) throws SQLException
{
DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
// Connect to the local database
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@myhost:1521:ORCL","system", "ahmed");
// Query the employee names
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("SELECT name FROM doctor");
// Print the name out
while (rset.next ())
System.out.println (rset.getString (1));
//close the result set, statement, and the connection
rset.close();
stmt.close();
conn.close();
}
}