- This lesson will teach you the following concepts
- Creating the project
- Creating the analysis
- Generating the analysis
Appendix 2. Using SQL data
This lesson will teach you the following concepts
- Creating a project.
- Creating an analysis.
Estimated time: 40 mn
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: |
Your SQL database is ready for this lesson.
- Connect to your SQL server.
- Import onto the SQL server the SQL script files and the image directory (found in the "\Exercises\SQLDatabase\" directory of directory containing the tutorial examples) with the available import tools (MySql, Oracle, SQL Server, ...). The image directory is used to get the images of Product data file.
- Run the SQL script files on the SQL server.
Note: The provided SQL scripts operate on Oracle only.
- The wizard steps for creating the analysis are as follows:
- 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. Go to the next wizard step.
- You now have the ability to choose the types of databases used by the project. Select OLE DB (or the SQL database use if you own the corresponding Native Connector).
Note: Native Connectors are listed first.
Go to the next wizard step.
- Select the OLE DB source corresponding to the type of your database.
Go to the next wizard step.
- 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.
- Specify the mode for accessing data. 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.
- In our case, choose "Access the data in its current format directly". Go to the next step.
- Select the tables (files) to import.
- Validate and end the wizard. The tables are imported and viewed into the data model editor.
- The analysis is as follows:
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:
- In the data model editor, on the "Analysis" pane, in the "Analysis" group, click "Generation".
- 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.
Click [Add] to post a comment