|
<< Click to Display Table of Contents >> C Examples: DbiInsertRecord |
![]() ![]()
|
Append or insert a record on the specified table.
If the table has an index, insert the record; otherwise, append the record. This example uses the following input:
fAddRecord(hCur, pRecBuf);
DBIResult fAddRecord(hDBICur hTmpCur, pBYTE pTmpRecBuf)
{
DBIResult rslt;
CURProps CurProps;
rslt = Chk(DbiGetCursorProps(hTmpCur, &CurProps));
if (rslt != DBIERR_NONE)
return rslt;
if (CurProps.iIndexes == 0)
rslt = Chk(DbiAppendRecord(hTmpCur, pTmpRecBuf));
else
rslt = Chk(DbiInsertRecord(hTmpCur, dbiNOLOCK, pTmpRecBuf));
return rslt;
}