Skip to main content

Hello,

I want to use ODBC connection to postgres database  with a cobol SQL program (Visual Cobol + oesql).

I've got this error :

SQL CODE : 000019520-
ORDER : OPEN CURPARMOD
MESSAGE SQL : Connection does not support HOLD cursors

How can i configure my ODBC.ini to work correctly with HOLD cursor

Or is there a postgres ODBC driver on Linux with HOLD cursor capability ?

Thanks for your help.

Laurent.

Hello,

I want to use ODBC connection to postgres database  with a cobol SQL program (Visual Cobol + oesql).

I've got this error :

SQL CODE : 000019520-
ORDER : OPEN CURPARMOD
MESSAGE SQL : Connection does not support HOLD cursors

How can i configure my ODBC.ini to work correctly with HOLD cursor

Or is there a postgres ODBC driver on Linux with HOLD cursor capability ?

Thanks for your help.

Laurent.

Hi Laurent,

The Visual COBOL documentation for DECLARE CURSOR states the following:

  • If a HOLD cursor is requested and the current connection closes cursors at the end of transactions, the OPEN statement will return an error (SQLCODE = -19520).

By default, the cursor behavior is set to close cursors after a COMMIT. You can change this behavior by adding the following SQL directive to your program:

SQL(CLOSE_ON_COMMIT=NO)

This is documented here.


Hi Laurent,

The Visual COBOL documentation for DECLARE CURSOR states the following:

  • If a HOLD cursor is requested and the current connection closes cursors at the end of transactions, the OPEN statement will return an error (SQLCODE = -19520).

By default, the cursor behavior is set to close cursors after a COMMIT. You can change this behavior by adding the following SQL directive to your program:

SQL(CLOSE_ON_COMMIT=NO)

This is documented here.

It's OK.

Thank you for your help.

Regards.