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 runtime. 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));
Session.PrivateDir := "C:\TEMP";
Session->PrivateDir = "C:\\TEMP";
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|