ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Attention : This is version 27 of this documentation page. This feature may have been changed or removed in a higher version.
Help / WLanguage / Managing databases / HFSQL functions / HFSQL functions
  • Closing data files
  • Example for handling the data files installed locally and remotely
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
HSetRemoteAccess (Function)
In french: HGèreAccèsDistant
HFSQLHFSQL Client/ServerAvailable 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.
Example
// 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.
Component: wd270hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help