Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  ESQL/C ifx_var_init() purpose and usage

    Posted Wed January 15, 2025 07:22 AM

    Hello,

    When are using ESQL/C ifx_var_*() functions to fetch LVARCHAR data dynamically in our Informix driver for Genero BDL.

    For now we do following to initialize the opaque structure used by this API:

    void *lvarchar = NULL;
    ifx_var_flag(&lvarchar, 1);

    There is this ifx_var_init() we do not use for now. Is this required or is ifx_var_flag() sufficient?

    Note BTW that the ifx_var_init() function is miss in the ESQL/C documentation.

    Seb



    ------------------------------
    Sebastien FLAESCH
    ------------------------------


  • 2.  RE: ESQL/C ifx_var_init() purpose and usage

    Posted Wed January 15, 2025 08:07 AM
    If it follows the same logic as the mi_new_var() UDR function then the memory is not initialized.  IMHO it makes no sense to initialize it as you use mi_set_vardata() and mi_set_varlen() soon after to write something into the location


    On 1/15/2025 6:21 AM, Sebastien FLAESCH via IBM TechXchange Community wrote:
    0100019469e99da7-5346e04b-fe63-4ddb-ad3d-4388b382e672-000000@email.amazonses.com">
    Hello, When are using ESQL/C ifx_var_*() functions to fetch LVARCHAR data dynamically in our Informix driver for Genero BDL. For now we do... -posted to the "Informix" group