Re: connection is busy with results for another stmt
Monday, November 5, 2001 05:58 AM
you cannot execute two statements on a single connection. function 1 executes st1 statement on conn. function 2 tries to execute st2 on the same connection. but this is not possible. you need to create another connection in function 2 to execute st2. a single connection can work on only a single statement at one time. if you want to execute another statement, you have to close the first statement. so, to fix the problem, create another connection - conn2 - in function 2 and create st2 from conn2 (e.g. Statement st2 = con2.createStatement(...);).