blk_default

Description

Retrieves a column’s default value.

Syntax

CS_RETCODE blk_default(blkdesc, colnum, buffer,
              buflen, outlen)
 CS_BLKDESC   *blkdesc;
 CS_INT              colnum;
 CS_VOID           *buffer;
 CS_INT              buflen;
 CS_INT            *outlen;

Parameters

blkdesc

A pointer to the CS_BLKDESC that serves as a control block for the bulk-copy operation. blk_alloc allocates a CS_BLKDESC structure.

colnum

The number of the column of interest. The first column in a table is column number 1, the second is number 2, and so forth.

buffer

A pointer to the space in which blk_default will place the default value.

buflen

The length, in bytes, of the *buffer data space.

outlen

A pointer to an integer variable.

If supplied, blk_default sets *outlen to the length, in bytes, of the default value.

If the default value is larger than buflen bytes, an application can use the value of *outlen to determine how many bytes are needed to hold the value.

Returns

blk_default returns:

Returns

Indicates

CS_SUCCEED

The routine completed successfully.

CS_FAIL

The routine failed.

blk_default returns CS_FAIL if the application has not called blk_init to initialize the bulk-copy operation.

Usage

See also

blk_bind, blk_describe, blk_init