Opens an analysis in HFSQL Classic format via a remote access (this function is equivalent to the second syntax of HOpenAnalysis
). This allows you to access the data files described in the analysis as well as the structure of these data files. A specific configuration is required on the server and on the client computer. See Remote access with HFSQL
for more details.
HConnectRemoteAccess is used to handle data files via Internet: this operation is transparent to the user.
Caution: When opening a "remote" analysis, some HFSQL functions are not run locally anymore: these functions are sent to the DLL for managing the remote HFSQL functions via the remote access module of wdxxxcom.dll. The only change (from a programming point of view) for an application that uses the remote access is performed in the analysis opening.
: To open a remote analysis, a specific configuration is required for the server and for the client computer. See Remote access with HFSQL
for more details.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
// Open the SALESMGT analysis via a remote access
IF HConnectRemoteAccess("192.168.1.1", "User", "UserPassword", ...
"C:\SALESMGT\SALESMGT.WDD", "SalesMgtPassword") = False THEN
Error("Unable to open the analysis on the server." + CR + ...
"Error found: " + HErrorInfo())
<Result> = HConnectRemoteAccess(<Server Address> [, <User Name> [, <User Password> [, <Path of .WDD> [, <Password>]]]])
- True if the analysis was opened,
- False otherwise. HErrorInfo returns more details about the problem (see the Remarks).
<Server Address>: Character string (with quotes)
IP address or DNS name of server.
Reminder: An IP address is a character string containing the "Internet Protocol" address of the computer in the xxx.xxx.xxx.xxx format.
<User Name>: Optional character string (with quotes)
Name of user (for accessing the data).
If this parameter is not specified, the default user name will be used (ANONYMOUS).
<User Password>: Optional character string (with quotes)
User password (associated with the user name).
If this parameter is not specified, the default user password will be used (HYPERFILE).
<Path of .WDD>: Optional character string (with quotes)
Full path of ".WDD" file of analysis. This file contains the description of analysis to open.
If only the drive and name of analysis are specified: the analysis is sought in the current directory of the specified drive.
If neither the drive, nor the analysis path are specified, the analysis is sought in the current directory of the current disk.
If this parameter is not specified, the analysis associated with the current application is opened.
<Password>: Optional character string (with quotes)
Analysis password, defined in the data model editor.
Opening a remote analysis from an application associated (or not) with an analysis
The table below presents the different cases for using HConnectRemoteAccess:
|Application associated with an analysis||Application not associated with an analysis|
|Opening the analysis locally (on the deployment server)||Automatic opening when the application is started||Opening performed by HOpenAnalysis (the analysis to open must be specified)|
|Opening the analysis on another server||Opening performed by HConnectRemoteAccess (there is no need to specify the name and path of analysis to open)||Opening performed by HConnectRemoteAccess (the analysis to open must be specified)|
|Result of HConnectRemoteAccess||False:|
In all the cases, the application keeps working with the current analysis.
- if the analysis associated with the application does not exist on the server.
- if the specified analysis does not exist on the server.
|False if the specified analysis does not exist on the server. |
The next access to the database will generate a WLanguage error.
In all the cases, the analysis is opened on the server.
- if the analysis associated with the application exists on the server and if it is valid.
- if the specified analysis exists on the server and if it is valid.
|True if the specified analysis exists on the server and if it is valid. |
The analysis is opened on the server.
: The analysis opened by HConnectRemoteAccess
- first, in the main library of the application according to its full physical name.
- then, on the current disk.
Opening an analysis this is already opened
HConnectRemoteAccess has no effect if HConnectRemoteAccess opens an analysis that is is already opened on the server.
Caution: When using HConnectRemoteAccess, the current HFSQL context is automatically re-initialized. The following operations are automatically performed:
- Closing the current analysis.
- All opened data files are closed.
- All existing HFSQL views are deleted.
- All existing queries are deleted.
- All the declarations performed by HDeclareExternal and HDescribeFile are deleted.
The default user (name: ANONYMOUS and password: HYPERFILE) is supported by the remote access server supplied with WINDEV (WDRemoteAccessServer).
If you are using another remote access server, a default user must be added into the WdRpcSrv.ini file. This file contains the connection rights granted to the users. This file is a text file that is found in the same directory as the RPC server. It must contain a "password" section in which each entry point is a user name.