Home | Sign in | English UK
New WINDEV 25 feature!
  • This lesson will teach you the following concepts
  • Overview
  • Creating the project
  • Creating the analysis
  • Generating the analysis
Appendix 2. Using data from an external database
This lesson will teach you the following concepts
  • Creating a project.
  • Creating an analysis.
Lesson duration

Estimated time: 40 mn
Previous LessonTable of contentsNext Lesson
This lesson allows you to handle the SQL databases with WINDEV.


This lesson is intended to the users with a good knowledge of SQL databases. Some operations to perform on the SQL database will not be presented in details
To create an application that is using an SQL database, you must:
  • Create the project linked to the application. This project will group all application elements (windows, codes, queries, reports, ...).
  • Import the description of SQL data files.


To follow this lesson, you must:
  1. Connect to your SQL server.
  2. Import the SQL script files and the image directory to the SQL server (located in "\Exercises\SQLDatabase\", in the directory that contains the examples of this tutorial) with the available import tools (MySql, Oracle, SQL Server, etc.). The image directory is used to get the images of Product data file.
  3. Run the SQL script files on the SQL server.
    Remark: The provided SQL scripts operate on Oracle only.
Your SQL database is ready for this lesson.
Creating the project
  • To create the project:
    1. Start WINDEV (if not already done).
    2. Display the WINDEV home page (Ctrl + <).
    3. In the home page, click the "Create a project" button and select "Windows or Linux application". The project creation wizard starts. The different steps of the wizard help you create your project. The information specified in this wizard can be modified later.


      Tip: To create a project, you can also:
      1. Click Create an element among the quick access buttons.
      2. The element creation window appears: click "Project".
    4. The first step of the wizard allows you to select the operating system for which the project is intended. Select "Windows platform" and go to the next step of the wizard ("Next").
    5. For this lesson, we are going to create a "blank" project. Select "Create a blank project" and go to the next step of the wizard.
    6. WINDEV then proposes to specify the platform description. Keep the default options ("Windows 32-bit executable" and "Executable with windows"). Go to the next step of the wizard.
    7. The wizard proposes to type the name of project, its location and its description. In our case, this project will be named "sqldatabase".
    8. The different steps of the wizard are indicated in the menu on the left. These steps can be clicked directly. Since the other steps in the "Description" are not strictly necessary, you can click "Guidelines" directly.
    9. This step is used to define the code style. Don't modify the suggested options. Go to the next step.
    10. This step is used to define the style book. Select "Elegant". Go to the next step.
    11. Click the "Database" step. This step is used to give information regarding the database.
    12. Select "Yes, use an existing database".
      Using an existing database
      Go to the next step
    13. Select "Import the description from an existing database".
      Selecting the database
    14. The analysis creation wizard starts.
Creating the analysis
  • The steps of the analysis creation wizard are as follows:
    1. Specify the analysis name and directory. By default, the analysis name corresponds to the project name and the analysis directory is a ".ana" directory in the project directory. We will keep these default parameters.
      Analysis creation wizard
      Go to the next step of the wizard.
    2. Next, you can choose the types of databases used by the project. Select OLE DB (or the SQL database use if you own the corresponding Native Connector).
      Remark: Native Connectors are listed first.
      Selecting the type of database
      Go to the next step of the wizard.
    3. Select the OLE DB source corresponding to the type of your database.
      Go to the next step of the wizard.
    4. In the following steps, specify the parameters of your OLE DB connection (the steps are identical for a Native Access):
      • the connection name (the caption associated with the connection is optional). Go to the next step.
      • the name of database server. Go to the next step.
      • the user name and password. Go to the next step.
      • the database name if necessary. Go to the next step.
    5. Specify the mode for accessing data.
      Data access mode
      You can:
      • access the data in its current format directly. Only the description of tables is imported into the analysis. No conversion is required.
      • convert the data to HFSQL Classic format.
    6. In our case, choose "Access the data in its current format directly". Go to the next step.
    7. Select the tables (files) to import.
      Selecting tables to import
    8. Validate and end the wizard. The tables are imported and viewed in the data model editor.
  • The analysis is as follows:
    Analysis of this tutorial
Generating the analysis
Generating the analysis consists in validating the modifications performed in the analysis (creation of data files, addition or deletion of items, etc.) and to apply them to the entire project (pages, linked controls, reports, etc.).
The generation is automatically proposed when closing the data model editor while modifications have been performed.
You also have the ability to generate the analysis manually. That's what we are going to do.
  • To generate the analysis:
    1. In the data model editor, on the "Analysis" pane, in the "Analysis" group, click "Generation".
    2. The analysis generation is automatically started.
When your analysis is generated, the data can be handled like the HFSQL data. There is no difference. You can:
  • Create a full application via RAD (Rapid Application Development). See "Lesson 3.4. The full RAD" for more details.
  • Create a full custom application. See "Part 4" for more details.
Previous LessonTable of contentsNext Lesson
Minimum version required
  • Version 25
Click [Add] to post a comment