Share this page

# Example: lrd_ora8_lob_write and lrd_ora8_lob_create_temporary

In the following example, an insert statement inserts a large object (LOB) into a table. A temporary LOB is created by lrd_ora8_lob_create_temporary. The lrd_ora8_lob_write function writes a string into the LOB. This LOB is then inserted into a table.

    lrd_ora8_handle_alloc(OraEnv1, STMT, &OraStm1, 0);

    lrd_ora8_stmt(OraStm1, "insert into updtab values (NULL, :LOBVAL)", 1, 0, 0);

    lrd_ora8_handle_alloc(OraEnv1, LOB, &OraLob1, 0);

    lrd_ora8_lob_create_temporary(OraSvc2, OraLob1, 0, 1, 2, 1, 10, 0);

    lrd_ora8_lob_write(OraSvc2, OraLob1, -1, 0, 1,
        "This could be a long LOB.", -1, 0, 0, 0, 0);

    lrd_assign(&LOBVAL_D1, OraLob1, 0, 0, 0);

    lrd_ora8_bind_placeholder(OraStm1, &OraBnd1, "LOBVAL", &LOBVAL_D1, 0, 0, 0);

    lrd_ora8_exec(OraSvc2, OraStm1, 1, 0, &uliRowsProcessed, 0, 0, 0, 0, 0);

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