Sets the current database for a particular SQL Server connection.
SqlUse% ( sqlconn%, sqlname$ )
where
SUCCEED (1) or FAIL (0).
SqlUse% sets up the Transact-SQL USE statement and calls SqlExec% and SqlResults%. If the USE statement fails because the requested database has not yet completed a recovery process, SqlUse% continues to send USE statements at 1-second intervals until it succeeds or it encounters some other error.
Before SqlUse% sets the current database, it calls SqlFreeBuf to clear the command buffer. If you call SqlCmd% to place statements into the command buffer, execute these statements before calling SqlUse%.