| Purpose |
Gets the next increment number for an autoincrement table |
|
| Old name |
#define autoinc rec_autoinc |
|
| Syntax (CCOWN) |
void rec_autoinc(short *datarec); |
|
| Syntax (DP4DBAPI) |
BOOLEAN dp4_rec_autoinc(DCONN * dconn,short * datarec); |
|
| Parameters |
DCONN * dconn |
Handle to database connnection |
|
short * datarec |
Pointer to the L field of the database record | |
| Description |
If the data record belongs to a table which has the autoincrementing property, the last key field of the record is filled in with an autoincrement value, otherwise an error is generated. Note that rec_autoinc() cannot update the database until a subsequent call to db_commit() or db_checkpoint() is made. Two calls to rec_autoinc() between consecutive calls to db_commit() or db_checkpoint() give the same value. The utility MAKEDB shows the current value for an autoincrement table. For the DP4DBAPI version of the API the return value is TRUE if the function completes without errors. |
|
| See also | ||