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.
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.
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
The handle of the created object or a negative value in the case of an error. |