jdbc如何連續查詢?

vesor發表於2004-05-15
第二次執行executeQuery()時出錯:Before start of result set

Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = java.sql.DriverManager.getConnection。。。。。。。。。
stmt = conn.createStatement();

query = aaaaaaaaaaaa
rs = stmt.executeQuery(query);
rs = stmt.getResultSet();

query = bbbbbbbbb
rs = stmt.executeQuery(query);
rs = stmt.getResultSet();

rs.close();
stmt.close();
conn.close();

相關文章