PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • How to proceed?
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Optimizing the connection times to the HFSQL Client/Server databases
HFSQL Client/ServerAvailable only with this kind of connection
Overview
This help page explains how to optimize the connection times to the HFSQL Client/Server databases by limiting the network traffic.
How to proceed?
Several function calls may be required in order for an application to connect by programming to a HFSQL Client/Server database:
  • HOpenConnection to specify the server address, the user, the database,
  • HChangeConnection to associate some tables with a connection or with another one,
  • HPass to specify the password of encrypted files,
  • HChangeDir to specify a particular database folder,
  • ...
The order in which these functions are called is important: it influences the time required to establish the connection. The gain is not significant for the connection of a desktop application accessing the server via a local network. But from a mobile application in iOS or Android, the impact can be significant if the connection goes through a mobile network with latency.
Therefore, the following sequence should be used:
  1. HChangeConnection
  2. HChangeDir
  3. HPass
  4. HOpenConnection
instead of:
  1. HOpenConnection
  2. HChangeConnection
  3. HChangeDir
  4. HPass
Indeed, if HOpenConnection is called first, the connection is immediately opened with network traffic. Then, the other functions will trigger other exchanges between the application and the server in order to modify the parameters of the connection that was just opened.
On the contrary, if HOpenConnection is called last, the information required to configure the connection is sent at once: limited network traffic, the performances are improved.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment