|
|
|
|
- Closing data files
- Example for handling the data files installed locally and remotely
HSetRemoteAccess (Function) In french: HGèreAccèsDistant
Available only with these kinds of connection
Warning
From version 17, HSetDistantAccess is kept for backward compatibility. This function is replaced by HSetRemoteAccess.
Temporarily disables the remote access in order to access HFSQL Classic data files found locally. By default, the remote access is automatically managed as soon as a remote analysis is opened by HOpenAnalysis. Caution: The use of this function is reserved to experienced developers. HSetRemoteAccess applies to HFSQL data files only.
// Open a remote analysis HOpenAnalysis("REMOTEANA.WDD", "", "192.32.8.10", "MyLogin", "Password") // Open a remote file HOpen("MYREMOTEFILE") // ... HSetRemoteAccess(False) // The following HFSQL commands will be performed locally HOpen("MYLOCALFILE") Â Â Â // Open a local data file // ... HSetRemoteAccess(True) // The following HFSQL commands will be performed remotely // ... HCloseAnalysis()
HSetRemoteAccess(True) // The following HFSQL commands will be performed remotely HOpen(Customer) Â Â Â // Open a remote file //... HSetRemoteAccess(Orders, False) // The Orders data file becomes local HReadFirst(Customer) // Reads the first record remotely HReadFirst(Orders) // Read the first record locally
Syntax
<Former mode> = HSetRemoteAccess([<Data file>, ] <Management mode>)
<Former mode>: Boolean - True if remote access was supported before the call to HSetRemoteAccess,
- False if remote access was not supported before using HSetRemoteAccess.
<Data file>: Optional character string Name of the data file used. Used to enable (or not) the management of remote access for a single data file. If this parameter is not specified or if it corresponds to "*", the management of the remote access is taken into account for all the data files found in the analysis. <Management mode>: Boolean - False to temporarily disable the management of remote access,
- True to re-enable the management of remote access.
Remarks Closing data files Temporarily disabling the management of remote access does not close the data files used locally or remotely. Example for handling the data files installed locally and remotely - Opening a remote analysis with HOpenAnalysis. The management of the remote access is enabled.
- Opening the remote RPCFile data file with HOpen.
- Looping through the RPCFile remote data file.
- Temporarily disabling remote access with HSetRemoteAccess.
- Opening the local LocalFile data file with HOpen.
- Looping through the LocalFile local data file.
- Re-enabling remote access with HSetRemoteAccess.
- The following data files are accessible:
- Local LocalFile file,
- Remote RPCFile file.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|