informix
INFORMIX-ESQL/C Programmer's Manual
ESQL/C Function Library

ifx_var_alloc()

The ifx_var_alloc() function allocates memory for the data buffer of an lvarchar or var binary host variable.

Syntax

var binary

lvarchar

Usage

The allocation flag of the ifx_var_flag() function notifies ESQL/C of the allocation method to use for the data buffer. If you set the allocation flag in ifx_var_flag() to 0, you must explicitly allocate memory for the data of a var binary host variable with the ifx_var_alloc() function.

Important: Whether you allocate memory or allow ESQL/C to allocate the memory for you, you must free the allocated memory using the ifx_var_dealloc() function.

Return Codes

0 The function was successful.
<0 The function was not successful and the return value indicates the cause of the error.

Related Functions

ifx_var_dealloc(), ifx_var_flag()


INFORMIX-ESQL/C Programmer's Manual, Version 9.21
Copyright © 1999, Informix Software, Inc. All rights reserved