|
<< Click to Display Table of Contents >> C Examples: DbiCopyTable |
![]() ![]()
|
Copy a source table into a destination table.
If pNewCur is not NULL, DbiCopyTable returns a cursor handle from the newly created table. This example uses the following input:
fDbiCopyTable(hDb, "STOCK.DB", "NEWSTOCK.DB", &hNewCur);
DBIResult fDbiCopyTable(hDBIDb hTmpDb, pCHAR SourceTbl, pCHAR DestTbl, phDBICur pNewCur)
{
DBIResult rslt;
rslt = Chk(DbiCopyTable(hTmpDb, TRUE, SourceTbl, NULL, DestTbl));
if (rslt != DBIERR_NONE)
return rslt;
if (pNewCur != NULL)
rslt = Chk(DbiOpenTable(hTmpDb, DestTbl, NULL, NULL, NULL, 0, dbiREADWRITE,
dbiOPENSHARED, xltFIELD, FALSE, NULL, pNewCur));
return rslt;
}