Connection con;
Statement sql;
ResultSet rs;
try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException e){}
try { con=DriverManager.getConnection("jdbc:odbc:nw","" ,"");
sql=con.createStatement();
rs=sql.executeQuery("SELECT * FROM 雇员 where (雇员id)>3");
out.print("<Table>");
out.print("<TR>");
out.print("<TH width=50>"+"雇员id");
out.print("<TH width=50>"+"姓氏");
out.print("<TH width=70>"+"名字");
out.print("<TH width=100>"+"雇用日期");
out.print("<TH width=50>"+"地址");
out.print("</TR>");
while(rs.next())
{
out.print("<TR>");
out.print("<TD >"+rs.getInt("1")+"</TD>");
out.print("<TD >"+rs.getString("2")+"</TD>");
out.print("<TD >"+rs.getString("名字")+"</TD>");
out.print("<TD >"+rs.getDate("雇用日期")+"</TD>");
out.print("<TD >"+rs.getString("地址")+"</TD>");
out.print("</TR>") ;
}
out.print("</Table>");
con.close();
sql.close();
}
catch(SQLException e1) {
out.print("error!");
out.print(e1.toString());
}