opensourcecobol / Open-COBOL-ESQL

Open Cobol ESQL (ocesql) is an open-source Embedded SQL pre-compiler and run-time library designed for COBOL applications which access an open-source database.
https://www.osscons.jp/osscobol/
GNU Lesser General Public License v3.0
50 stars 24 forks source link

include error message in CONNECT errors #78

Open GitMensch opened 1 year ago

GitMensch commented 1 year ago

currently OCDB_PGConnect gets the error message - but only set it into the error log:

https://github.com/opensourcecobol/Open-COBOL-ESQL/blob/eec3a231f12225cd1341bb0c4e6f17d7b38845ab/dblib/ocpgsql.c#L44-L52

It should either store the message somewhere for later lookup or the error message should be get later again to set it into SQLERRM.

The easiest way to reproduce: just specify a user that doesn't exist...