informix-community

Open full view…

Automatic conversion of ifx_loc_t (TEXT/BYTE) to/from ifx_lo_t (CLOB/BLOB)

sebflaesch
Wed, 27 May 2020 06:34:40 GMT

We have legacy Informix ESQL/C code using ifx_loc_t to handle TEXT/BYTE columns. Customers want now to replace TEXT/BYTE by CLOB/BLOB columns... and we would avoid to touch our ESQL/C code. Informix can support simple type conversion. For example, when binding an (int) C sqlvar to insert data into a VARCHAR column, and it can fetch a varchar value into an int, as long as the string represents a valid integer... same for dates, decimals... as long as conversion rules are satisfied. It would save us a lot of work, if Informix could do the same conversion between TEXT/BYTE sqlvar (ifx_loc_t) and CLOB/BLOB columns in the database! The only need we have is to insert/update complete TEXT/BYTE variables in the client program to CLOB/BLOB columns, or to fetch as a whole the CLOB/BLOB data into TEXT/BYTE variables. We do not need to handle CLOB/BLOB pieces. If the CLOB/BLOB does not fit into a TEXT/BYTE locator, just raise an overflow error... IBM/HCL people: Any chance to have ESQL/C or the server do the job for us? Seb