|
<< Click to Display Table of Contents >> C Examples: DbiOpenRintList |
![]() ![]()
|
Creates a string containing all the names of referential integrity constraints on the specified table.
This example uses the following inputs:
fDbiOpenRintList(hDb, "ORDERS.DB", Buffer);
DBIResult fDbiOpenRintList(hDBIDb hDb, pCHAR TblName, pCHAR RIntList)
{
DBIResult rslt;
hDBICur hTmpCur = 0;
RINTDesc RIDesc;
RIntList[0] = '\0';
rslt = Chk(DbiOpenRintList(hDb, TblName, szPARADOX, &hTmpCur));
if (rslt == DBIERR_NONE)
{
while (DbiGetNextRecord(hTmpCur, dbiNOLOCK, (pBYTE)&RIDesc, NULL) == DBIERR_NONE)
{
strcat(RIntList, RIDesc.szRintName);
strcat(RIntList, " ");
}
}
return rslt;
}