Đang chuẩn bị liên kết để tải về tài liệu:
My SQL and Java Developer’s Guide phần 4

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Bạn sẽ thấy văn bản "Hello World Chương trình hoạt động" trên màn hình của bạn. Nếu bạn không thấy văn bản này, kiểm tra hướng dẫn của Sun để sửa chữa cài đặt. Hầu hết các mã trong phần còn lại của cuốn sách này thực hiện theo phiên bản sản xuất của mã này, nhưng hiệu suất tốt hơn và nhiều thay đổi nhỏ hỗ trợ JDBC | Advanced ResultSet Manipulation 109 Do last Button lastButton new JButton lastButton.addActionListener new ActionListener public void actionPerformed ActionEvent e try rs.last accountIDText.setText rs.getString acc_id usernameText.setText rs.getString username passwordText.setText rs.getString password tsText.setText rs.getString ts activeTSText.setText rs.getString act_ts catch SQLException insertException displaySQLErrors insertException Do first Button firstButton new JButton firstButton.addActionListener new ActionListener public void actionPerformed ActionEvent e try rs.first accountIDText.setText rs.getString acc_id usernameText.setText rs.getString username passwordText.setText rs.getString password tsText.setText rs.getString ts activeTSText.setText rs.getString act_ts catch SQLException insertException displaySQLErrors insertException Do gotoButton gotoButton new JButton Goto gotoButton.addActionListener new ActionListener Listing 5.7 Our navigatable ResultSet. continues D10 Using JDBC with Java Applications and Applets public void actionPerformed ActionEvent e try rs.absolute Integer.parseInt gotoText.getText accountIDText.setText rs.getString acc_id usernameText.setText rs.getString username passwordText.setText rs.getString password tsText.setText rs.getString ts activeTSText.setText rs.getString act_ts catch SQLException insertException displaySQLErrors insertException Do freeQueryButton freeQueryButton new JButton Execute Query freeQueryButton.addActionListener new ActionListener public void actionPerformed ActionEvent e try if freeQueryText.getText .toUpperCase . indexOf SELECT 0 rs statement.executeQuery freeQueryText.getText if rs.next accountIDText.setText rs.getString acc_id usernameText.setText rs.getString username passwordText.setText rs.getString password tsText.setText rs.getString ts activeTSText.setText rs.getString act_ts else int i statement.executeUpdate freeQueryText.getText errorText.append Rows affected i loadAccounts catch .

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.