<%@page import ="java.sql.*" %>
<%
String DBDRIVER = "oracle.jdbc.driver.OracleDriver";
String DBURL = "jdbc:oracle:thin:@hostname:8080:orcle:YK";
String DBNAME = "himyorcle";
String DBPASS = "123456";
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
boolean flag = false;
String sql = "SELECT * FROM JOB_OPENNING";
try {
Class.forName(DBDRIVER);
conn = DriverManager.getConnection(DBURL,DBNAME,DBPASS);
pstmt = conn.prepareStatement(sql);
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,c_id);
pstmt.setString(2,job_id);
pstmt.setString(3,posinfo);
pstmt.setString(4,no_new);
pstmt.setString(5, title);
rs = pstmt.executeQuery();
int i =1;
if(rs.next()) {
out.println(rs.getString(i));
i++;
}
rs.close();
pstmt.close();
conn.close();
}catch (Exception e) {
out.println(e);
}
%>
when I do this, I have built the classpath and environment path for ojdbc6.jar and ojdbc6_g.jar. However, it still have problems for this.
I don't know why. I DO HAVE THE JAR IN THIS PROGRAM.