|
<< Click to Display Table of Contents >> C Examples: DbiSetDirectory |
![]() ![]()
|
Set the working directory for the specified database.
If the main directory cannot be set, the function attempts to set a backup directory. This example uses the following input:
fDbiSetDirectory(hDb, "c:\bde\\examples\\tables", "c:\\bde32\\examples\\tables", &Main);
DBIResult fDbiSetDirectory(hDBIDb hTmpDb, pCHAR MainDir, pCHAR BackupDir, pBOOL Main)
{
DBIResult rslt;
rslt = Chk(DbiSetDirectory(hTmpDb, MainDir));
if (rslt == DBIERR_NONE)
*Main = TRUE;
else
{
rslt = Chk(DbiSetDirectory(hTmpDb, BackupDir));
if (rslt == DBIERR_NONE)
*Main = FALSE;
}
return rslt;
}