I
iamwbq
Unregistered / Unconfirmed
GUEST, unregistred user!
<html>
<body>
<%@page language="java"%>
<%@page import="java.sql.*"%>
<%
String sDBDriver="sun.jdbc.odbc.JdbcOdbcDriver";
String sConnStr="jdbcdbck";
String sql="select * from product";
Connection conn = null;
ResultSet rs = null;
Class.forname(sDBDriver);
conn = DriverManager.getConnection(sConnStr);
Statement stmt = conn.createStatement();
rs=stmt.executeQuery(sql);
String tt;
while (rs.next()) {
tt=rs.getString("PID");
out.print("<LI>"+rs.getString("CNo")+"</LI>");
out.print("<pre>"+tt+"</pre>");
}
rs.close();
%>
</body>
</html>
<body>
<%@page language="java"%>
<%@page import="java.sql.*"%>
<%
String sDBDriver="sun.jdbc.odbc.JdbcOdbcDriver";
String sConnStr="jdbcdbck";
String sql="select * from product";
Connection conn = null;
ResultSet rs = null;
Class.forname(sDBDriver);
conn = DriverManager.getConnection(sConnStr);
Statement stmt = conn.createStatement();
rs=stmt.executeQuery(sql);
String tt;
while (rs.next()) {
tt=rs.getString("PID");
out.print("<LI>"+rs.getString("CNo")+"</LI>");
out.print("<pre>"+tt+"</pre>");
}
rs.close();
%>
</body>
</html>