mridoni / gixsql

GixSQL is an ESQL preprocessor and a series of runtime libraries to enable GnuCOBOL to access PostgreSQL, ODBC, MySQL, Oracle and SQLite databases.
GNU General Public License v3.0
16 stars 8 forks source link

Cursors cannot be re-opened after close #98

Closed mridoni closed 2 years ago

mridoni commented 2 years ago

currently when a cursor is closed, it is not just marked as such, but its declaration is removed. Since there is no UNDECLARE CURSOR, at the time it seemed the logical thing to do, but in all evidence it is not, since it prevents one from re-opening the cursor after it has been closed.

The solution might be just marking it as closed and destroying only the resources (if any) allocated when it is was opened, so leaving it ready for being re-opened.

Originally posted by @mridoni in https://github.com/mridoni/gixsql/issues/88#issuecomment-1198970631

mridoni commented 2 years ago

This patch should solve it, I hope to be able to issue a (pre?)release in the middle of next week containing also the improved EXEC SQL VAR stuff (#21)

issue98.patch.txt

GitMensch commented 2 years ago

According to the release notes - solved. I suggest closing it.