Explicitly Create 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 SAP ASE memory.

Note: When explicitly creating a locator, SAP ASE 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
Note: You can also create a locator that references an empty LOB.