Explicitly creating a locator

Use the create_locator function to explicitly create a locator.

Both examples create and return a LOB locator that references a LOB value stored in Adaptive Server memory.

NoteWhen explicitly creating a locator, Adaptive Server always sends a locator, regardless of the value of send_locator.

Using a select statement to create a locator is most useful when the client application stores the received locator for use in subsequent Transact-SQL statements. In an isql session, the locator is assigned to a local variable. For example:

declare @v text_locator

select @v = create_locator(text_locator, textcol) from 
my_table where id = 10

NoteYou can also create a locator that references an empty LOB.