Uses a particular database.
RETCODE dbuse (
PDBPROCESS dbproc,
LPCSTR dbname );
where
SUCCEED or FAIL.
This function executes a Transact-SQL USE statement for the specified database for a particular DBPROCESS. It sets up the statement and calls dbsqlexec and dbresults.
If the USE statement fails because the requested database has not yet completed a recovery process, dbuse continues to send USE statements at 1-second intervals until it either succeeds or encounters some other error.
The function uses the dbproc provided by the caller and its command buffer. Any existing statements in the buffer are lost, and the command buffer is cleared by dbuse when it is finished.
dbchange, dbname, dbresults, dbsqlexec