|
<< Click to Display Table of Contents >> C Examples: DbiDeleteTable |
![]() ![]()
|
Delete a table.
Must have sufficient rights. This example uses the following input:
fDbiDeleteTable(hDb, "dBASE_TBL.DBF");
DBIResult fDbiDeleteTable(hDBIDb hDb, pCHAR TblName)
{
DBIResult rslt;
rslt = Chk(DbiDeleteTable(hDb, TblName, NULL));
return rslt;
}
Delete an opened table.
Once executed, the cursor is closed and the table deleted. This example uses the following input:
fDbiDeleteTable(hDb, &hCur);
DBIResult fDbiDeleteTable(hDBIDb hDb, phDBICur phCur)
{
DBIResult rslt;
CURProps Props;
rslt = Chk(DbiGetCursorProps(*phCur, &Props));
if (rslt != DBIERR_NONE)
return rslt;
rslt = Chk(DbiCloseCursor(phCur));
if (rslt != DBIERR_NONE)
return rslt;
rslt = Chk(DbiDeleteTable(hDb, Props.szName, Props.szTableType));
return rslt;
}