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

allow prepared statements with plain pic x data and literals #64

Open GitMensch opened 2 years ago

GitMensch commented 2 years ago

As seen in https://github.com/opensourcecobol/Open-COBOL-ESQL/blob/1b272b886edda8b794160d9ecfc1fa12962f5470/tests/sqlca.src/prepare-execute.at the only option to use prepared statements is currently the use of a varlength group.

It should also work with a plain PIC X item (automatically rtrimmed if needed, but as trailing spaces likely also "work" in the db this may not be necessary) and most important: with a plain literal.