Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try{
- String sql="SELECT * FROM saturday where course = '?' and section ='?'";
- PreparedStatement ps=con.prepareStatement(sql);
- ps.setString(1, crs);
- ps.setString(2, se);
- ResultSet rs=ps.executeQuery();
- while(rs.next())
- {
- String d = rs.getString("Day");
- String t = rs.getString("Time");
- String r = rs.getString("Room");
- String c = rs.getString("Course");
- String s = rs.getString("Section");
- String tc = rs.getString("Teacher");
- model.addRow(new Object[]{d,t,r,c,s,tc});
- }
- table.setModel(model);
- }catch(Exception ex)
- {
- JOptionPane.showMessageDialog(null, ex);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement