Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't have two cursors on same connection #224

Open
roettker opened this issue Dec 20, 2022 · 0 comments
Open

can't have two cursors on same connection #224

roettker opened this issue Dec 20, 2022 · 0 comments

Comments

@roettker
Copy link

I opened two cursors on the same db connection
cursor1 = dgh01.cursor()
cursor2 = dgh01.cursor()
Then I excute an sql on each of them:
cursor1.execute("select id from contracts where id = 100247")
cursor2.execute("select id from contracts where id = 100247")
if I now do a cursor1.fetchall I get a

java.sql.SQLException: java.sql.SQLException: The result set is closed (see below)

As I remember from perl DBI it was possible to act with two cursors on the same DB-connection.


Exception Traceback (most recent call last)
File AbstractResultSet.java:362, in org.firebirdsql.jdbc.AbstractResultSet.next()

Exception: Java Exception

The above exception was the direct cause of the following exception:

java.sql.SQLException Traceback (most recent call last)
Input In [198], in <cell line: 1>()
----> 1 cursor1.fetchall()

File ~/.local/lib/python3.9/site-packages/jaydebeapi/init.py:593, in Cursor.fetchall(self)
591 rows = []
592 while True:
--> 593 row = self.fetchone()
594 if row is None:
595 break

File ~/.local/lib/python3.9/site-packages/jaydebeapi/init.py:559, in Cursor.fetchone(self)
557 if not self._rs:
558 raise Error()
--> 559 if not self._rs.next():
560 return None
561 row = []

java.sql.SQLException: java.sql.SQLException: The result set is closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant