Share this page

# lrd_ora8_stmt_literal

Prepares a literal SQL statement string for execution.

    LRDRET lrd_ora8_stmt_literal( void *mpvLRDDBIHandleStmt, char *mpcStmtText, long mliLanguage, long mliMode, int miDBErrorSeverity );

mpvLRDDBIHandleStmt | A non-NULL pointer to an LRDDBI Statement Handle.
mpcStmtText | The SQL statement as a literal string constant.
mliLanguage | One of the LRD_LANGUAGE_ options.
mliMode | The database mode.
miDBErrorSeverity | The Error Severity Levels of a failure in a database routine.

The lrd_ora8_stmt_literal function prepares a literal SQL or PL/SQL statements for execution. Use lrd_ora8_stmt_ext with string constants that contain embedded null-characters. The length of the statement is determined using the formula: sizeof()-1.

If one lrd_ora8_stmt_literal function is followed by another (without an lrd_ora8_exec in between), the strings are concatenated. Note that a single handle can support multiple, successive SQL statements.

The lrd_ora8_exec function resets the contents of the SQL statement set by lrd_ora8_stmt_literal; you must provide a new SQL statement after every lrd_ora8_exec function call.

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: mpcStmtText

## Example

In the following example, lrd_ora8_stmt_literal sets a statement to run a stored procedure whose name contains a null character. The statement string is viewed as a literal string.

Copy code

    lrd_handle_alloc_ora(OraEnv1, STMT, &OraStm1, 0);
    lrd_ora8_stmt_literal(OraStm1, "begin dbms_output0.disable; end;", 1, 0, 0);
    lrd_ora8_exec(OraSvc1, OraStm1, 1, 0, &uliRowsProcessed, 0, 0, 0, 0, 0);
    lrd_handle_free(&OraStm1, 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: