Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

dam_addLOBLocatorValToRow

  • Last Updated: May 12, 2026
  • 2 minute read
    • OpenAccess SDK
    • Version 9.0
    • Documentation

This function gets LOB data from the IP, based on a request from the client. The IP calls this method to add the locator value. When a client requests data, OpenAccess SQL Engine invokes OAIP_GetLongData, which is then exported from the IP.

The IP layer can call this function to set a LOB locator value for the long data column specified by hCol in the row specified by hRow. Setting a LOB locator as the column value in the row allows the long data value for that column to be fetched in pieces. Fetching the long data in pieces can greatly reduce the amount of memory needed to process a query result because the entire long data value does not need to be held in memory.

The locator specified by pColVal is treated as an opaque handle. The SQL Engine does not process the locator. The SQL Engine passes the locator handle or object specified by pColVal to the OAIP_GetLongData function when it needs to fetch the actual data for the column.

To support streaming for a specific column, the IP should call this function to add a locator value. When the client requests data, the SQL Engine invokes OAIP_GetLongData, which must be exported from the IP.

The iXOType argument must be set to one of the following types:

for all columns:

  • XO_TYPE_DEFAULT

for LONGVARBINARY columns:

  • XO_TYPE_BINARY
  • XO_TYPE_VARBINARY
  • XO_TYPE_LONGVARBINARY
  • XO_TYPE_CHAR
  • XO_TYPE_VARCHAR
  • XO_TYPE_LONGVARCHAR

for LONGVARCHAR columns:

  • XO_TYPE_CHAR
  • XO_TYPE_VARCHAR
  • XO_TYPE_LONGVARCHAR
  • XO_TYPE_WCHAR
  • XO_TYPE_WVARCHAR
  • XO_TYPE_WLONGVARCHAR
int dam_addLOBLocatorValToRow(
    DAM_HSTMT  hstmt, 
    DAM_HROW   hRow, 
    DAM_HCOL   hCol, 
    int        iXoType, 
    void    *  pColVal, 
    long       lColValLen)

Parameters for dam_addLOBLocatorValToRow

Parameter Type Description
IN
hstmt DAM_HSTMT The statement handle
hRow DAM_HROW The row handle
hCol DAM_HCOL The column handle
iXoType int Type of the stream.
pColVal void * LOB locator value, for example, File Handle.
IColValLen long The LOB locator value length.
RETURN
int DAM_SUCCESS - added the locator to the row.
DAM_FAILURE - error adding the locator to the row.

See also

TitleResults for “How to create a CRG?”Also Available inAlert