If you assign one locator to another, a new locator value is assigned to the new variable. Each locator has a unique locator value. In this example, the third statement assigns a new LOCATOR which is created by copying the LOB value referenced by @v to @w. For example:
declare @v text_locator, @w text_locator select @v = create_locator(text_locator, textvol) from my_table where id = 5 select @w = @v
You can use the set send_locator on command to implicitly create a locator by specifying that all LOB values in a result set are to be converted to the relevant locator type and then sent as such to the client. For example:
set send_locator on select textcol from my_table where id = 5
Because send_locator is on, Adaptive
Server creates a locator for each row value of textcol
,
and sends the resulting locators to the client. If send_locator is
off (the default), Adaptive Server sends the actual text value.