sp_sql_make_object

sp_sql_make_object

This pool modifier creates an object in the pool of the type specified in the object_type parameter, and returns the handle specified in the handle parameter. All object fields are set to null values.

sp_sql_make_object

 

@object_type t_type_name,

@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_make_object 'Jobs', @h output

exec sp_sql_set_field @h, 'Job Number', '12'

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.

 

@handle

integer output

The handle of the created object or a negative value in the case of an error.

 


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