home *** CD-ROM | disk | FTP | other *** search
- .Na "dbchange"
- .Aa
- .Fu
- Determine whether a command batch has changed the current database.
- .Ih "database, determining whether it has changed"
- .Sy
- .Sf "char *dbchange(dbproc)"
- .Sp "DBPROCESS" "*dbproc"
- .Co
- .Bl
- \f2dbchange()\f1 informs the program of a change in the current database.
- It does so by catching any instance of the \*N USE command.
- .Bl
- Although a USE command can appear anywhere in a command batch, the
- database change does not actually take effect until the end of the batch.
- \f2dbchange()\f1 is therefore
- useful only in determining whether the current command batch has changed
- the database for subsequent command batches.
- .Bl
- The internal DBPROCESS flag that \f2dbchange()\f1 monitors to determine whether
- the database has changed is cleared when the program executes a new command batch
- by calling either
- .I "dbsqlexec()"
- or
- .I "dbsqlsend()."
- Therefore, the simplest way to keep track of database changes is to call
- \f2dbchange()\f1 when \f2dbresults()\f1 returns NO_MORE_RESULTS
- at the end of each command batch.
- .Bl
- Alternatively, you can always get the name of the current database by calling
- .I "dbname()."
- .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.
- .in -.375i
- .Re
- .br
- A pointer to the null-terminated name of the new database, if any.
- If the database has not changed, NULL will be returned.
- .Sa
- dbname,
- dbresults,
- dbsqlexec,
- dbsqlsend,
- dbuse
-