New WEBDEV 2024 feature!
Help / WEBDEV Tutorial / Tutorial - Managing an HFSQL Client/Server database
  • Lesson 1 - Implementing a Client/Server database
  • Overview
  • Installing a local HFSQL server
  • Adapting a website to use an HFSQL Client/Server database
  • Opening the example project
  • Adapting the project
  • To sum up
  • Further information

Tutorial - Managing an HFSQL Client/Server database

Lesson 1 - Implementing a Client/Server database
We will cover the following topics:
  • Installing a local HFSQL server.
  • Creating a website that uses an HFSQL Client/Server database.
  • Adapting a website to manage an HFSQL Client/Server database.
Durée de la leçon 10 min
WEBDEV allows you to create applications/websites that access HFSQL Client/Server databases.
The Client/Server mode allows you to host databases on a server (it can be different from the server where the website is deployed). This operating mode:
  • increases data security,
  • allows you to easily manage multiple users,
  • facilitates maintenance,
  • allows for remote connections (for back-office operations, for example).
In this lesson, we will perform all the operations required to develop and deploy a website that uses an HFSQL Client/Server database.
For more details on HFSQL Client/Server, see HFSQL Client/Server.
Installing a local HFSQL server
The first operation to perform consists in installing an HFSQL server.
This server can be installed on the development computer (that's what we are going to do). In the deployment phase, the server can be installed on a specific computer or directly on the server that hosts your website.
The HFSQL server setup program is included in the WINDEV, WEBDEV and WINDEV Mobile setup media. If you don't have this media, the HFSQL server setup is also available on our site (
To install the HFSQL server locally:
  1. Start the WINDEV/WEBDEV/WINDEV Mobile setup program.
  2. Select "Install HFSQL Client/Server".
  3. Then, select "Install or update an HFSQL server".
  4. Accept the license agreement.
  5. Select a platform ("For Windows on this computer").
  6. If there are HFSQL servers already installed on the current computer, select "Install a new server".
  7. Select the installation directory and specify the server name and port. The port 4900 will be used by default.
    Don't forget to open this port on the firewall in order to connect to the HFSQL server from another computer.
  8. Specify the login credentials of the user with administrator privileges that will be created by default on the HFSQL server. By default, this user is "Admin" and has no password.
    For security reasons, don't forget to change the administrator password.
  9. Install the HFSQL Control Center if it is not already installed or cannot be accessed from your computer.
    The HFSQL Control Center is required to manage the HFSQL Client/Server database.
  10. The wizard prompts you to configure the sending of notifications to identify server problems in real time. In this case, go to the next step and indicate that the settings will be defined "Later".
  11. The wizard allows you to enable the Active Directory authentication. Enable this option if necessary.
  12. You can help us improve by allowing us to collect information regarding the use of our products. This optional and anonymous data collection allows PC SOFT to improve its products.
The installation is completed.
By default (if you have not changed the administrator settings), to connect to the server in administrator mode, you must use the "Admin" user without password.

Remark: In this tutorial, we explain how to adapt an existing application to Client/Server mode. However, once the HFSQL server has been installed, you can directly develop an application that uses HFSQL Client/Server data. The only difference with a project that uses HFSQL Classic data is the format of the data manipulated in the analysis: the databases used by the project are in "HFSQL Client/Server" mode.
For more details on how to create a WEBDEV project and an analysis, see Creating a WEBDEV project and its analysis.
Adapting a website to use an HFSQL Client/Server database
Switching an HFSQL Classic database to Client/Server is the most common operation.
WEBDEV includes multiple solutions to perform this operation:
  • from the data model editor.
  • from the HFSQL Control Center.
To better understand the different steps, we are going to change the "Full WEBDEV Site" project to Client/Server mode using the data model editor.

Opening the example project

This tutorial uses the "WD Full Application" project. To open this example:
  1. Go to the WEBDEV home page (Ctrl + <).
  2. On the home page, click "Tutorial", then in "Tutorial - Manage an HFSQL Client/Server database", double-click "Full WEBDEV Site - Answers".
This project will be used in the different lessons of this tutorial.

Adapting the project

To adapt the "Full WEBDEV Site" project:
  1. Load the analysis of your project in the data model editor: click Load project analysis in the quick access buttons of the WEBDEV menu. The data model editor is displayed.
  2. In the ribbon, on the "Analysis" tab, in the "Connection" group, click "New connection". A wizard opens, allowing you to create a connection.
  3. Select the type of connection to create: "HFSQL Client/Server".
    Selecting the type of database
    Go to the next step.
  4. In the following steps, specify:
    Choose server
    • the name of the server on which the HFSQL Client/Server server was installed (localhost if it was installed on your computer, for example), and the port number.
    • the username and password (to use the administrator, specify the login credentials defined when the HFSQL server was installed).
    • the database name ("Full_WEBDEV_Site" in our example).
    • the name of the connection (keep the default name).
  5. Go to the next step and validate. The connection to the database is automatically created. The wizard prompts you to associate the different data files in the analysis with the connection that has just been created.
    Associating data files with the connection
  6. Click "Yes".
  7. In the next step, select all the data files:
    Select data files
    Go to the next step.
  8. A dialog box prompts you to copy the data files to the server. Validate ("Copy now").
    Copy data files
  9. Select the analysis data files to be copied to the server: in our case, all data files in the EXE directory.
    Copy data files
  10. Go to the next step and validate.
  11. The data files in the analysis are automatically changed into HFSQL Client/Server data files and associated with the selected connection.
    Data model editor
  12. Generate the analysis: In the ribbon, on the "Analysis" tab, in the "Analysis" group, click "Generation". An automatic modification of the data files is automatically proposed. If all the data files are up to date, the automatic modification of the data files can be canceled.
    Switching to Client/Server mode: tips
    • Check the code of your project: in HFSQL Client/Server mode, HSubstDir and other similar statements have no effect.
    • You can modify the connection defined in the analysis with HOpenConnection and HChangeConnection according to the parameters specified when it was created.
    • HOpenConnection is used to go back to HFSQL Classic mode: simply specify the path of the directory containing the HFSQL Classic data files.
  13. The development project was successfully adapted. You may also have to adapt the deployed website (if the deployed site uses HFSQL Classic data files, for example). This operation is configured when creating the website setup program.
To sum up
In this lesson, we saw how to install a local HFSQL server. We adapted a WEBDEV project to use an HFSQL Client/Server database.
In the next lesson, we will see how to manage an HFSQL Client/Server database.
Further information
In this lesson, we saw how to adjust some settings in the website to use an HFSQL Client/Server database. HFSQL Client/Server offers many specific features that we won't cover in this tutorial:
Table of contentsNext Lesson
Minimum version required
  • Version 2024
Click [Add] to post a comment

Last update: 12/08/2023

Send a report | Local help