Share this page

# lrd_dynamic

Specifies the dynamic SQL statement to be processed (CtLib only).

    LRDRET lrd_dynamic( LRD_CURSOR *mptCursor, char *mpcID, long mliIDLen, char *mpcText, long mliTextLen, LRDOS_INT4 mjCmdType, int miDBErrorSeverity);

mptCursor | A pointer to an LRD_CURSOR structure.
mpcID | A pointer to the statement identifier.
mliIDLen | The length of the text pointed to by mpcID (negative for null-terminated).
mpcText | A pointer to the string containing the request specification.
mliTextLen | The length of the text pointed to by mpcText (negative for null-terminated).
mjCmdType | The type of cursor command to initiate: an option number from LRD DYNAMIC CTLIB OPT
miDBErrorSeverity | The Error Severity Levels of a failure in a database routine.

The lrd_dynamic function specifies a dynamic SQL statement to process.

For more details refer to the Function Header File lrd.h in the include directory.

## Return Values

See LRD Return Values.

## Parameterization

The following argument can be parameterized using standard parameterization: mpcText

## Example

In the following example, the lrd_dynamic function instructs the server to create a new dynamic table.

    lrd_stmt(Csr1, "use pbdemodb ", -1, 148, -99999, 0);
    lrd_exec(Csr1, 0, 0, 0, 0, 0);
    lrd_result_set(Csr1, -205 /*End results*/, 4046 /*Done*/, 0);
    lrd_dynamic(Csr1, "", -1, "create table dynamic (first CHAR(10),second "
        "CHAR(10),third INT)", -1, 719, 0);
    lrd_exec(Csr1, 0, 0, 0, 0, 0);

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: