Example: lrd_ora8_lob_read

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);