Specifying Paradox Directory Locations
Go Up to Managing database sessions Index
Two session component properties, NetFileDir and PrivateDir, are specific to applications that work with Paradox tables.
NetFileDir specifies the directory that contains the Paradox network control file, PDOXUSRS.NET. This file governs sharing of Paradox tables on network drives. All applications that need to share Paradox tables must specify the same directory for the network control file (typically a directory on a network file server). Delphi derives a value for NetFileDir from the Borland Database Engine (BDE) configuration file for a given database alias. If you set NetFileDir yourself, the value you supply overrides the BDE configuration setting, so be sure to validate the new value.
At design time, you can specify a value for NetFileDir in the Object Inspector. You can also set or change NetFileDir in code at run time. The following code sets NetFileDir for the default session to the location of the directory from which your application runs:
Session.NetFileDir := ExtractFilePath(Application.EXEName);
Session->NetFileDir = ExtractFilePath(ParamStr(0));
PrivateDir specifies the directory for storing temporary table processing files, such as those generated by the BDE to handle local SQL statements. If no value is specified for the PrivateDir property, the BDE automatically uses the current directory at the time it is initialized. If your application runs directly from a network file server, you can improve application performance at run time by setting PrivateDir to a user's local hard drive before opening the database.
The following code changes the setting of the default session's PrivateDir property to a user's C:\TEMP directory:
Session.PrivateDir := "C:\TEMP";
Session->PrivateDir = "C:\\TEMP";