Hi,
I am new to Java JDBC. I tried one small program to connect to Oracle database and it results in an error saying "Driver not found"
This is the code snippet I tried:
String url = "jdbc
dbc.<dsn>"
Properties p = new Properties();
p.put("UID","scott");
p.put("PWD","tiger");
Connection conn = DriverManager.getConnection(url,p);
String select = "SELECT EMPNO FROM EMP";
PreparedStatement ps = conn.prepareStatement(select);
ResultSet rs = ps.executeQuery();
int empno = rs.getInt(1);
System.out.println(empno);
There may be some syntax error. But this is my logic. I don't know what I missed. I need some suggestion from you.
Thank You