zhuzhengyu
Technical User
I use jdbc to connect Oracle database,jdbc driver is "classes111.zip" which provided by Oracle8i.
I know if we open too much resultset and forget to close there could occurs such error,but in my program I do close after use RecordSet ,but I code like this because of the complex logic:
Connection con=...;
for(...){
Statement st=con,createStatement();
ResultSet rs=st.excecuteQuery("..."
;
while(rs.next()){
Statement st1=...;
ResultSet rs1=...;
...;
rs1.close();
st1.close();
}
rs.close();st.close();
}
is there any problem?
if someone knows ,ps. tell me as quick as possible.thanks a lot
0 replies in this thread
I know if we open too much resultset and forget to close there could occurs such error,but in my program I do close after use RecordSet ,but I code like this because of the complex logic:
Connection con=...;
for(...){
Statement st=con,createStatement();
ResultSet rs=st.excecuteQuery("..."
while(rs.next()){
Statement st1=...;
ResultSet rs1=...;
...;
rs1.close();
st1.close();
}
rs.close();st.close();
}
is there any problem?
if someone knows ,ps. tell me as quick as possible.thanks a lot
0 replies in this thread