602SQL Documentation Index  

wb_set_lob_mode

PHP

boolean wb_set_lob_mode(resource cursor, integer new_lob_mode)


Parameters

cursor
Open cursor, the result of the wb_execor wb_psql_execute function.
new_lob_mode
new mode for reading LOBs (Large OBjects, database value of variable-length, CLOB and BLOB types), the possible values are:


Description

Sets the new mode of reading LOBs from an open cursor cursor. This setting is valid for reading LOBs from this cursor using the wb_result and wb_fetch_into. The setting for each new opened cursor is WB_LOBMODE_DIRECT.

The current mode for reading LOBs from an open cursor may be retrieved by the wb_get_lob_mode function.



Returns

TRUE if successful, otherwise FALSE.



Example

Set the WB_LOBMODE_RESOURCE mode, open a resource and read part of the CLOB:

$cursor=wb_exec($connection,"SELECT clob_column FROM clob_table WHERE id=1");
wb_set_lob_mode($cursor,WB_LOBMODE_RESOURCE);
wb_fetch_row($cursor);
$clob=wb_result($cursor,"clob_column");
echo wb_lob_read($clob,0,20);