Press "Enter" to skip to content

View statistics book of library management system.

Viewing Statistics is very important for a library management system.

It is final post of this project and I think it will be very useful to learner. Any student can easily use this code and make his/her project completely.

To get help you can see the video.

Source code for add new student in library page.

  1. Connect with connection class…
Connection con;
ResultSet rs;
PreparedStatement pst;

public Statistics() {
initComponents();
con = Connect.dbConnect();
middle();
Issue();
Return();
}

public void middle() {
setLocationRelativeTo(null);
}

 

public void Issue() {
try {
String query = "select * from issue";
pst = con.prepareStatement(query);
rs = pst.executeQuery();
jTable1.setModel(DbUtils.resultSetToTableModel(rs));

} catch (SQLException e) {
JOptionPane.showMessageDialog(null, e);
}
}
    
public void Return() {
try {
String query = "select Student_ID,Name,Book_ID,BName,DOI,DOR from returnbook";
pst = con.prepareStatement(query);
rs = pst.executeQuery();
jTable2.setModel(DbUtils.resultSetToTableModel(rs));

} catch (SQLException e) {
JOptionPane.showMessageDialog(null, e);
}
}

 

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *