lrd_ora8_lob_write
Writes characters to a large object descriptor.
LRDRET lrd_ora8_lob_write( void * mpvLRDDBIHandleSvcCtx, void * mpvLRDDBIHandleLob, unsigned long mjAmtToWrite, unsigned long * mpjAmtWritten, unsigned long mjOffset, char * mpszBuf, unsigned long mjBufl, unsigned char mPiece, unsigned short mjCsid, unsigned char mjCsfrm, int 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. |
| mjAmtToWrite | The number of bytes to write |
| mpjAmtWritten | Pointer to the number of bytes written on output. |
| mjOffset | The offset for start of write. |
| mpszBuf | Buffer to be written. |
| mjBufl | The buffer length. |
| mjPiece | Piece. |
| 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_write function writes characters to a large object descriptor (LOB).
Return Values
See LRD Return Values.
Parameterization
The mpszBuf argument can be parameterized using standard parameterization.
Example
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);

