Tag: callable statement

无法检索使用存储过程选择的值

我正在努力寻找记录。 这让我选择使用存储过程在我的数据库中查找现有记录。 当我试图搜索现有数据时,它没有给我我想要的价值。 当我点击搜索按钮时,它不会将值打印到文本字段。 码 private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { String searchSection = Section_SearchSection_Textfield.getText(); String searchSection_Name = Section_SectionName_TextField.getText(); int sectionID = 0; if (searchSection.isEmpty()) { JOptionPane.showMessageDialog(null, “Please fill up this fields”); } else try (Connection myConn = DBUtil.connect()) { try (CallableStatement myFirstCs = myConn.prepareCall(“{call getSECTION_NAME(?,?)}”)) { myFirstCs.setInt(1, sectionID);// I set the ID for Primary Key […]