Example: lrd_ora8_save_colOracle 8.0 Functions

Saves the value of a table cell to a parameter.

LRDRET lrd_ora8_save_col( void *mpvLRDDBIHandleStmt, unsigned int muiColNum, long mliRowNum, unsigned long muliOption, char *mpszParamName );

mpvLRDDBIHandleStmt A non-NULL pointer to an LRDDBI Statement Handle.
muiColNum The column number of the value to save.
mliRowNum The row number of the value to save. To save the last row, set the row number to zero.
muliOption One of the Save Column Options.
mpszParamName A parameter name using alpha-numerical characters, enclosed by quotation marks.

The lrd_ora8_save_col function saves the dynamic value of a specified table cell and assigns it to a parameter. This function is used for Correlating Statements and other SQL statements within a script. Instead of using the actual result fetched during a query, you replace the constant value with a parameter. This parameter can then be used by other database statements within the same script. Note that lrd_ora8_save_col always precedes an lrd_ora8_fetch statement.

If no rows are fetched, the parameter is marked as uninitialized. If less rows are fetched than the specified row number, the value from the last fetched row is saved. The column value is obtained for columns previously specified by lrd_ora8_bind_col . When more than one lrd_ora8_save_col is issued for the same column, only the most recent lrd_ora8_save_col applies.

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

Return Values

See LRD Return Values.


You cannot use standard parameterization for any arguments in this function.