IBM / nodejs-idb-connector

A JavaScript (Node.js) library for communicating with Db2 for IBM i, with support for queries, procedures, and much more. Uses traditional callback-style syntax
MIT License
37 stars 23 forks source link

Set SQL_ATTR_NON_HEXCCSID CLI environment attribute by default #135

Closed abmusse closed 2 years ago

abmusse commented 3 years ago

Another option might be to set the SQL_ATTR_NON_HEXCCSID CLI environment attribute. This will change the job CCSID to the default job CCSID if the the job CCSID is 65535. The default job CCSID is guaranteed to be a non-65535 CCSID.

Although idb-connector supports setting attributes, I'm not sure if this one can be set by the user, since it's an environment attribute and thus require a code change in idb-connector. FWIW, in the version of Python ibm_db we ship, we force this on: https://github.com/kadler/python-ibmdb/blob/ibmi/IBM_DB/ibm_db/ibm_db.c#L1492

Originally posted by @kadler in https://github.com/IBM/nodejs-idb-connector/issues/134#issuecomment-772679609