home *** CD-ROM | disk | FTP | other *** search
- .Na "dbuse"
- .Aa
- .Fu
- Use a particular database.
- .Ih "database, setting the"
- .Sy
- .Sf "RETCODE dbuse(dbproc, dbname)"
- .Sp "DBPROCESS" "*dbproc"
- .Sp "char" "*dbname"
- .Co
- .Bl
- This routine issues a \*N USE command for the
- specified database for a particular DBPROCESS.
- It sets up the command and calls
- .I "dbsqlexec()"
- and
- .I "dbresults()."
- .Bl
- If the USE command fails because the requested database
- has not yet completed a recovery process,
- \f2dbuse()\f1 will continue to send USE commands at one
- second intervals until it either succeeds or encounters
- some other error.
- .Bl
- The routine uses the
- .I dbproc
- provided by the caller. It also uses the command buffer of
- that
- .I dbproc.
- \f2dbuse()\f1 overwrites
- any existing commands in the buffer and clears the buffer
- when it is finished.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front-end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .Pi dbname
- The name of the database to use.
- .in -.375i
- .Re
- .br
- SUCCEED or FAIL.
- .Sa
- dbchange,
- dbname
-