DdfPath
Applies to
VAccess
Description
Sets the drive and path on which the DDF files associated with this control reside.
Remarks
This property attaches the VAccess control to a specific set of DDF data definition files. If you change this property, you must specify one of the Table Names in this DDF as the TableName property for the VAccess control.
Before changing this property at run time, you should close any currently open file associated with the VAccess control. You will then need to specify a new TableName property as one of the table names in the new DDF. You may also need to specify a new Location property before opening the new file.
*Note: If RefreshLocations is False, DdfPath cannot be changed.
OnRemote is called when DdfPath fails.
You can use this feature to resolve the path at run time or to inform the user that the connect failed.
DdfPath can take any of the following forms (discussed below)
Mapped Drives
Traditional driver-letter nomenclature (c:\path\datafile) are accepted by the DdfPath property, as in previous versions of the ActiveX. If the drive cannot be located, the VAccess will look for a file called IDSHOSTS using the path environment setting (this file may be used to map drive letters to network or IP addresses, much like LMHOSTS. For more information, see PSQL Programmer's Guide). If this file can be found, it will be searched for the requested path. If the requested path is mapped, the VAccess control will attempt to connect to an IDS at the specified location.
Uniform Resource Locator
A URL may also be used to specify location. The protocol-specific prefixes are pids for remote (IDS) calls and pmke for local. Thus, a local call would take the form pmke://{server}/[path/.../][tablename] and a remote call would appear pids://{server}/[path/.../][tablename].
Universal Naming Convention
UNC (\\server\path\datafile) can be used as a DdfPath entry as well, where the server can be either a PSQL server on the LAN, an IDS server or a server mapped in IDSHOSTS to an IDS server. If the server is not a standard IP address or domain name, the VAccess will attempt to resolve the server name locally. If the location is not available locally, the VAccess will then try to resolve the server name using IDSHOSTS and if successful will re-route calls to the IDS.
As described above, DdfPath can be used to specify local or remote access (see also PSQL Programmer's Guide). However, if remote access is requested, the VAccess will not attempt to connect to the IDS unless HostConnect is set to True. Additionally, the DdfPath and Location properties cannot attempt to access two different IDS servers simultaneously.
Therefore, if Location is set to a remote location & DdfPath is set to a different remote location, the server name will be changed in the Location property to reflect the new remote location specified by DdfPath. If Location is set to a local directory, DdfPath will not affect Location.
If HostAddress is set to specify a server using URIs, DdfPath will be ignored.
*Note: When DdfPath is changed, the VAccess will attempt to read the DDF files at the new path and update the internal table list, FieldList, and IndexList.
Example
'Close the currently opened file
Customers.Close
'Refresh dictionary information
Customers.RefreshLocations = True
Customers.DdfPath = "v:\accounts"
Customers.TableName = "customer002"
Customers.RefreshLocations = False
'Set the location information
Customers.Location = "cust002.dat"
'Open the file
stat = Customers.Open
See Also
Affects: Location, GetTableList, IndexList, FieldList
Affected by: RefreshLocations, HostAddress, HostConnect, OnRemote event