lrd_ora8_lob_read
Reads characters from a large object descriptor.
LRDRET lrd_ora8_lob_read( void * const mpvLRDDBIHandleSvcCtx, void * const mpvLRDDBIHandleLob, unsigned long const mjAmtToRead, unsigned long * const mpjAmtRead, unsigned long const mjOffset, unsigned long const mjBufl, unsigned short const mjCsid, unsigned char const mjCsfrm, int const miDBErrorSeverity );
| mpvLRDDBIHandleSvcCtx | A pointer to an LRDDBI Service Context Handle with a valid Server Handle attribute. |
| mpvLRDDBIHandleLob | A pointer to an LRDDBI Lob Descriptor Handle. |
| mjAmtToRead | The number of bytes to read |
| mpjAmtRead | Pointer to number of bytes to read on output. |
| mjOffset | Offset for start of read. |
| mjBufl | The buffer length. |
| mjCsid | The character set ID. |
| mjCsfrm | The character set form. |
| miDBErrorSeverity | The Error Severity Levels of a failure in a database routine. |
The lrd_ora8_lob_read function reads characters from a large object (LOB) descriptor after the descriptor has been fetched from the database. Note that the characters read by lrd_ora8_lob_read cannot be accessed.
This function may increase the load on the server substantially.
Return Values
See LRD Return Values.
Parameterization
You cannot use standard parameterization for any arguments in this function.
Example
In the following example, an Oracle select statement is executed on a table which contains a column holding a large object. The handle to the large object, OraLob2, is allocated in lrd_ora8_handle_alloc. After a row is fetched by the call to lrd_ora_fetch, the large object contained in the row is fetched by lrd_ora8_lob_read.
lrd_ora8_stmt(OraStm7, "select * from lobby\n", 1, 0, 0);
lrd_ora8_exec(OraSvc1, OraStm7, 0, 0, &uliRowsProcessed, 0, 0, 0, 0, 0);
lrd_ora8_handle_alloc(OraEnv1, LOB, &OraLob2, 0);
lrd_ora8_bind_col(OraStm7, &OraDef3, 1, &COL1_D16, 0, 0);
lrd_ora8_attr_set(OraDef3, CHARSET_FORM, "1", -1, 0);
lrd_assign(&COL1_D16, OraLob2, 0, 0, 0);
/* Fetch the row. This does not fetch the large object */
lrd_ora8_fetch(OraStm7, 1, 1, &uliFetchedRows, PrintRow6, 2, 0, 0);
/* Now fetch the large object in the row */
lrd_ora8_lob_read(OraSvc1, OraLob2, 80, 0, 1, 81, 0, 1, 0);
lrd_handle_free(&OraLob2, 0);
lrd_handle_free(&OraStm7, 0);

