dspool provides a non-visual user object (n_cst_dspool) that provides a  PowerBuilder Datastore "pooling" service.

Use the service to perform non-visual database operations such as retrieving results sets from queries, stored procedure calls etc, without coding embedded SQL which can be harder to maintain and less platform independant than DataWindows.

The following functions are provided:

of_getDS(ads_get): int

Allocates an unitialised datastore to use and returns it via ads_get.

of_getDS(ads_get, as_dwoname): int

Allocates a datastore to use (returned via ads_get), initialises it with the specified returns it via datawindow object and sets the transaction object to SQLCA.

of_getDS(ads_get, as_dwoname, atr_object): int

Allocates a datastore to use (returned via ads_get), initialises it with the specified returns it via datawindow object and sets the transaction object to atr_object.

of_returnDS(ads_return): int

Returns a datastore back to the pool. Typically called after the application code (e.g. an update function) has finished processing.

of_getSize(): int

Returns the number of datastores in the pool.

For example:

	n_ds	lds_work

	inv_dspool.of_getDS(lds_work, "d_query_results", SQLCA)

	lds_work.retrieve()

	/* do some processing */

	inv_dspool.of_returnDS(lds_work);

It is pretty rough-and-ready but should work as advertised :)