|
<< Click to Display Table of Contents >> DbiSetDirectory |
![]() ![]()
|
C syntax
DBIResult DBIFN DbiSetDirectory (hDb, pszDir);
Delphi syntax
function DbiSetDirectory (hDb: hDBIDb; pszDir: PChar): DBIResult stdcall;
Description
DbiSetDirectory sets the current directory for a standard database.
Parameters
hDb Type: hDBIDb (Input)
Specifies a standard database handle.
pszDir Type: pCHAR (Input)
Pointer to the client buffer specifying the new current directory path. If set to NULL, DbiSetDirectory sets the current directory to the default directory.
Usage
SQL, Access: DbiSetDirectory is not applicable to SQL and Access databases.
Prerequisites
If DbiSetDirectory has not been called, the directory is set to whatever was specified as the working directory in the DBIEnv structure in DbiInit. If pszDir is set to NULL, the directory reverts to the default directory. The default directory is the application's start-up directory. If an alias was used to open the database, the path that was specified in the alias is used as the current directory.
Completion state
After setting the directory, any TblList or FileList cursors opened on this handle are restricted to this directory, and any call to DbiOpenTable without a specified path is limited to searching to this directory. Any resources acquired before DbiSetDirectory is called, such as opened tables, are not affected by the change.
DbiResult |
Meaning |
DBIERR_NONE |
The current directory has been successfully set. |
DBIERR_NOTSUPPORTED |
This function is not supported with a non-standard database. |
DBIERR_INVALIDHNDL |
The specified database handle is invalid or NULL. |
See also