ResultSet rs;
rs = this.orderedProduct.select(" sum(unitstoproduce) "," soNo = "+ soNo);
int sum = Integer.parseInt(rs.getString(1));
當我嘗試執行Java類中上面的查詢我收到例外如下。 這裏orderedProduct(orderedZnAlProduct)是表的SQLException:在結果的開始時設置
SELECT sum(unitstoproduce) FROM orderedZnAlProduct WHERE soNo = '15005'
java.sql.SQLException: Before start of result set
[ResultSet異常 - 在結果集開始之前]可能的重複(https://stackoverflow.com/questions/2120255/resultset-exception-before-start-of-result-set) – 2018-01-14 10:32:49