ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Native Connectors/Native Accesses / Native Informix Connector
  • Overview
  • Importing the structure of files
  • The import steps
  • Taking into account the evolution of the Informix database
  • Programming
  • 1. Opening the connection
  • 2. Running queries
  • 3. Retrieving the result
  • 4. Closing the connection
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Informix Native Connector: Programming with HFSQL functions
Native Connectors (Native Accesses)Available only with this kind of connection
Overview
To use an Informix database with the Native Connector, the structure of Informix tables must be imported into the WINDEV or WEBDEV analysis.
Differences from SQL programming: To manipulate Informix data, queries are not mandatory. In fact, you can directly use HFSQL functions to read your data, perform searches and filters, etc. However, you will need to import the Informix file structure into your WINDEV or WEBDEV analysis.
Importing the structure of files

The import steps

To perform this import:
  1. Launch the data model editor: click on Load project analysis among the quick access buttons.
  2. On the "Analysis" tab, in the "Creation" group, expand "Import" and select "Import file/table descriptions...".
  3. The wizard starts. A connection to the Informix database is automatically established and associated with the files imported into the analysis. This connection will be used to handle the Informix data file programmatically.
In the different steps of the wizard, choose the following options:
  • Database type: Informix.
  • Connection features: Data server, User and password, Database.
  • The application will access the data in the current format.
  • When the connection is established, all you have to do is select the tables that will be imported into the WINDEV or WEBDEV analysis. These tables can be handled through programming with the HFSQL functions of WLanguage. These tables will be displayed in blue in the data model editor.

Taking into account the evolution of the Informix database

To take account of changes to tables imported into the data model editor, in the "Analysis" pane, in the "Analysis" group, pull down "Synchronization" and select "Update analysis from external databases".
A wizard starts, allowing you to:
  • analyze the differences for the imported tables
  • analyze the differences for all the Informix tables.
Programming

1. Opening the connection

To open the connection to the Informix database, use HOpenConnection and specify the name of the connection to be opened. The connection name was defined when importing the structure of files into the analysis.
To modify some parameters of this connection (username or password for example), call HConnect.
Remark: If you try to read the data file directly (function HReadFirst, ...), the connection associated with the data file description in the analysis will be automatically opened.

2. Running queries

HExecuteQuery and HExecuteSQLQuery are used to run queries on the current database.
  • HExecuteQuery: is used to run a preset query with the query editor.
  • HExecuteSQLQuery: is used to run a query by specifying the SQL code of the query and the name that will be assigned to this SQL code.
// Initialize the "Customer_84" query
HExecuteQuery(CUSTOMER_84, "InformixDatabase", hQueryWithoutCorrection)
HExecuteSQLQuery(QryCustomer, hQueryWithoutCorrection, ...
	"SELECT NAME FROM CUSTOMER", "InformixDatabase")

3. Retrieving the result

The result is browsed using all the classic read functions: HReadFirst, HReadNext, HReadSeek, ...
Note: The hLockWrite and hLockRead constants are ignored.. Indeed, the read and/or write locks are not supported by the Native Connector.

4. Closing the connection

HCloseConnection is used to close the connection to the database once all the necessary queries have been run.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/11/2025

Send a report | Local help