sp_sql_retrieve_object

sp_sql_retrieve_object

This pool modifier creates an object in the pool of the type specified in the object_type parameter and copies the whole object specified by the ID parameter from the database into the pool.

sp_sql_retrieve_object

@object_type t_type_name,

@id t_id_value,

@handle integer output

Please note that since the SQL SDK does not have an automated garbage collection procedure, objects created in or retrieved into the pool need to be disposed of after they are no longer needed (e.g. the objects have been saved to their permanent locations in the database). Otherwise, the pool will grow uncontrollably, increasing the database size and eventually degrading performance.

Example:

...

exec sp_sql_retrieve_object 'Jobs', '12', @h output

exec sp_sql_set_field @h, 'Job Name', 'My Job'

exec sp_sql_add_object @h -- Object "Jobs" is now permanently saved in VT

database and its temporary representation

in the Pool is not needed anymore.

exec sp_sql_release_object @h -- Removing Pool object with handle @h because

it is not needed any more.

...

 

Parameters

Value

Description

Notes

@object_type

t_type_name

The name of the object type to be retrieved.

 

@id

t_id_value

The ID of the object.

 

@handle integer

output

The handle of the object receiving the retrieved data.

 


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.