Tag: ora 01008

“ORA-01008:并非所有变量都绑定”错误

我使用以下方法通过使用jdbc计算工资单,但“ORA-01008:并非所有变量绑定”错误都没有删除。 有什么想法吗? 我正在使用以下代码 public double getPayroll(){ ResultSet rs = null; ResultSet rs1 = null; ResultSet rs2 = null; Connection conn = null; PreparedStatement pstmt = null; try { conn = getDBConnection(); double dailyPay=0,basicPay=0,payroll2=0; int houseRent=0,convAllow=0,noOfPresents=0,empId=0; String q = “select e_id from employee”; pstmt = conn.prepareStatement(q); rs = pstmt.executeQuery(); while (rs.next()) { empId=rs.getInt(1); String q1 = […]