ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL
  • Overview
  • Specific features
  • Which function to use?
  • HFSQL access
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Database access: summary
Overview
WINDEV, WEBDEV and WINDEV Mobile support different SQL query execution modes depending on how the database was accessed.
  • Access to an HFSQL database (can be freely distributed with your WINDEV applications):
    No setup constraint.
    The SQL and HFSQL functions (HReadxxx, ...) can be used with this type of access.
  • Access via a Native Connector (native access): Native Oracle, SQL Server, AS/400 Connector.
    An additional module is required for each type of Native Connector. Contact the sales department regarding the availability for your database.
    For the Oracle or SQL Server accesses, a client library must be installed on the user computer.
    The SQL and HFSQL functions (HReadxxx, ...) can be used with this type of access. This type of access is faster than the accesses by ODBC or via an OLE DB provider.
  • Access via a direct OLE DB driver:
    The characteristics of the connection to the database must be defined in the ODBC administrator of Windows. Only the SQL functions can be used for this type of access. The HFSQL functions (HReadxxx, ...) cannot be used.
  • ODBC access via the OLE DB provider:
    This type of access uses a specific OLE DB provider. This type of access is not recommended because it is slower than an access via an ODBC driver. Indeed, the performance is not as good as with a direct ODBC driver because the access is performed both via the ODBC driver and the OLE DB provider.
    The HFSQL (HReadxxx, ...) and SQL functions can be used with this type of access.
    The characteristics of the connection to the database must be defined in the ODBC administrator of Windows. The provider as well as MDAC 2.6 (or later) must be installed on the computer.
  • Access via an OLE DB provider:
    This type of access uses an OLE DB provider. The provider as well as MDAC 2.6 (or later) must be installed on the computer.
    The SQL and HFSQL functions (HReadxxx, ...) can be used with this type of access.
Specific features
xBase access possible via HFSQL
Specific xBase functions can be used in addition to the standard HFSQL functions (HDBOpen, etc.).
ASCII files
Use WLanguage functions specific to external files (fOpen, fRead, fWrite, etc.).
INI files
Use WLanguage functions specific to INI files (INIRead, INIWrite, etc.).
Managing the registry
Use WLanguage functions specific to the registry (RegistryQueryValue, RegistrySetValue, etc.).
Which function to use?

HFSQL access

HFSQL
Embedded access
SQL functionsHFSQL functions (HReadxxx, ...)
Database connectionSQLConnect
<Database Type> parameter: "HFSQL"
If the analysis is linked to the project, automatic connection, otherwise, use one of the following functions:
Dynamic description of the connectionNot usedNot used
Query executionSQLExecHExecuteQuery, HExecuteSQLQuery
Read the result- SQLFirst/SQLCol browse
- SQLFetch/SQLGetCol, SQLGetMemo browse
- SQLTable
All the standard read functions:
Lock recordsNot possibleHLockFile
HLockRecNum
Locking read functions (HReadFirst, HReadSeek, ...)
Switch to another open connectionSQLChangeConnectionNot used
Close connectionSQLDisconnectIf the analysis is linked to the project, automatic closing ; otherwise, use one of the following functions:
Speed (**)
General case
**(*)***
ORACLE, SQL Server, Access, ...
Native Connector/Access (*)
ODBC driver (Direct)
SQL functionsHFSQL functions (HReadxxx, ...)SQL functions
Database connectionSQLConnect
<Database Type> parameter: "ORACLE" or "SQL SERVER" or "AS400"
HOpenConnection with the name of the connection to open. The connection must be defined in the analysis or dynamically (see below)SQLConnect
<Database Type> parameter: "ODBC"
Dynamic description of the connectionHDescribeConnection
Query executionSQLExecHExecuteQuery, HExecuteSQLQuerySQLExec
Read the result- SQLFirst/SQLCol browse
- SQLFetch/SQLGetCol, SQLGetMemo browse
- SQLTable
All the standard read functions:
HReadFirst, HReadNext, HReadSeek, ...
Filters
- SQLFirst/SQLCol browse
- SQLFetch/SQLGetCol, SQLGetMemo browse
- SQLTable
Lock recordsSQLLockEach database includes specific features. For the native SQL Server or Oracle access, ability to use HLockFile.The locks are not supported by the ODBC driver.
Switch to another open connectionSQLChangeConnectionThe connection used is specified in HExecuteSQLQuery or in HExecuteQuery.SQLChangeConnection
Close connectionSQLDisconnectHCloseConnectionSQLDisconnect
Speed (**)
General case
*****(*)**
ORACLE, SQL Server, Access, ...
ODBC via the OLE DB provider
OLE DB provider
SQL functionsHFSQL functions (HReadxxx, ...)SQL functionsHFSQL functions (HReadxxx, ...)
Database connectionSQLConnect
<Database Type> parameter: "ODBC"
<OLEDB Provider> parameter: "MSSASQL" or the hODBC constant.
HOpenConnection with the name of the connection to open. The connection must be defined in the analysis or dynamically (see below)SQLConnect
<Database Type> parameter: "OLEDB"
<OLEDB Provider> parameter: corresponding to the desired option (character string ot constant)
HOpenConnection with the name of the connection to open. The connection must be defined in the analysis or dynamically (see below).
Dynamic description of the connectionHDescribeConnectionHDescribeConnection
Query executionSQLExecHExecuteQuery, HExecuteSQLQueryHExecuteQuery, HExecuteSQLQuery
Read the result- SQLFirst/SQLCol browse
- SQLFetch/SQLGetCol, SQLGetMemo browse
- SQLTable
All the standard read functions:
HReadFirst, HReadNext, HReadSeek, ...
Filters
- SQLFirst/SQLCol browse
- SQLFetch/SQLGetCol, SQLGetMemo browse
- SQLTable
All the standard read functions:
HReadFirst, HReadNext, HReadSeek, ...
Filters
Lock recordsThe locks are not supported by the provider.The locks are not supported by the provider.The locks are not supported by the provider.The locks are not supported by the provider.
Switch to another open connectionSQLChangeConnectionThe connection used is specified in HExecuteSQLQuery or in HExecuteQuery.SQLChangeConnectionThe connection used is specified in HExecuteSQLQuery or in HExecuteQuery.
Close connectionSQLDisconnectHCloseConnectionSQLDisconnectHCloseConnection
Speed (**)
General case
***** (*)
(*): Contact the sales department regarding the availability for your database.
(**): Speed indications are generic indications, the actual speed depends on the application, the configuration, the database content...
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/07/2023

Send a report | Local help