Function _conPutML() Foundation

Assigns a memo character string with explicit length to a container or produces a new memo container.

Syntax
ContainerHandle _conPutML(ContainerHandle ch,
                          CHAR *pBuffer, ULONG ulSize);
Parameters
ContainerHandle ch
Handle of a container or NULLCONTAINER.
CHAR *pBuffer
Pointer to any character string which is to be copied into the container.
ULONG ulSize
Length of the character string.
Return

Returns either the passed container handle or the handle to a new container. The return value is NULLCONTAINER if an error occurs.

Description

The function _conPutML() is used like _conPutCL() to assign a character string with explicit length to a container. The container is of memo type. This function is normally needed only for databases which support memo fields. Note that no corollary function _conGetML() exists. Since internally no difference exists between the memo type and character string type, _conGetCL() can be used as the corollary function to _conPutCL().

The character string is copied up to the indicated length including any NULL characters. When the container handle passed to _conPutML() has the value NULLCONTAINER, a new container is created. Otherwise, the value of the passed container is changed.

When a new container is created, it must be released with _conRelease() as soon as it is no longer needed.

Examples
/* 
Creates a container of memo type. 
*/ 
#include <xppcon.h> 

ContainerHandle  hString; 
CHAR             cBuffer[100]; 
XPPAPIRET        xr; 

/* ... initialization of the buffer with any data */ 

hString = _conPutML(NULLCONTAINER, cBuffer, sizeof(cBuffer)); 
if (hString != NULLCONTAINER) 
{ 
/* ... operations with the container */ 

_conRelease(hString); 
} 
else 
{ 
xr = _conLastError(); 
/* ... error handling */ 
} 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.