ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / Access via ODBC or OLE DB
  • Overview
  • Setup
  • Configuration
  • Using the analysis in a connection to an HFSQL Classic database
  • Remarks
  • Examples of OLE DB connection strings
  • Tree structure of data
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
Overview
The OLE DB provider for HFSQL is used to access an HFSQL database (Classic or Client/Server) from an external software that supports access via OLE DB.
The provider is available in read/write mode. An application written in an external language can read and write in HFSQL data files.
See a specific documentation about OLE DB for more details.
Setup
The OLE DB provider for HFSQL is supplied as a setup package available in the "Install\OLEDB" directory of WINDEV and WEBDEV.
By default, the OLE DB provider is installed in the "C:\Program Files\Common files\PC SOFT\29.0\OLEDB".
Remark: In order for an application to use an OLE DB provider, the MDAC component (Microsoft Data Access Component) version 2.8 or later must be installed. This component can be downloaded from the Microsoft site. It is included in the operating system from Windows 2003 Server and Windows Vista.
Configuration
The application that uses an OLEDB provider must provide a connection string. This string defines the provider to use as well as the connection parameters that must be given to this provider to establish the connection to the database.
This string (called connection string) can be:
  • entered in programming (in an application in C# or VB.Net for example).
  • built via a wizard (with Crystal Report for example).
The format of the connection string is as follows:
<Element1>=<Value1>;<Element2>=<Value2>;...;<ElementN>=<ValueN>
The elements of the connection string are as follows:
ElementValue when connecting to an HFSQL Client/Server databaseValue when connecting to an HFSQL Classic database
ProviderThis element is always set to "PCSOFT.HFSQL"
Data SourceName (or IP address) of the HFSQL server and connection port.
The port may not be specified if the server uses the default port (4900).
The name and the port number must be separated by ":" (colon).

Example: myserver.mycompany.fr:4910
Full path of the database analysis (.WDD file).
This parameter is optional.
Initial CatalogDatabase name.Full path of the directory containing the data files.
User IDUser name to connect to the HFSQL server.This parameter is ignored.
PasswordPassword to connect to the HFSQL server.Password of the database analysis (.WDD file).
This parameter is optional.
Extended PropertiesCharacter string containing the properties specific to the OLE DB provider for HFSQL.
This string has the following format:
<Property1>=<Value1>;<Property2>=<Value2>;...;<PropertyN>=<ValueN>

The \ (backslash), = (equal sign), ; (semicolon) or: (colon) characters used in this string must be preceded by \ (backslash).


The properties available for the "Extended Properties" element of the OLE DB connection string are as follows:
PropertyValue
PasswordPassword of the HFSQL data files in the following format:
<FileName>:<Password>
Remarks:
  • <FileName> represents the logical name of the data file.
  • <FileName> can be replaced by "*" (star) to specify that the password is applied to all the data files.
  • This property can be repeated to specify the passwords of several data files.
    Example: Password=MyFile1:Password1;Password=MyFile2:Password2
LanguageLanguage used by the OLE DB provider for HFSQL to process the string (sort, ...).
The values correspond to the constants of ChangeCharset.
The available values are:
Property valueCorresponding WLanguage constant
UTF-8charsetUTF8
ISO-8859-1 or ISO-LATIN-1charsetOccidental
ISO-8859-2 or ISO-LATIN-2charsetEastEurope
ISO-8859-3charsetTurkish
ISO-8859-4charsetBaltic
ISO-8859-5 or KOI8-RcharsetRussian
ISO-8859-6charsetArabic
ISO-8859-7charsetGreek
ISO-8859-8charsetHebrew
ISO-2022-JPcharsetJapanese
GB-2312charsetChinese
VISCIIcharsetVietnamese
BIG5charsetTraditionalChinese
ISO-2022-KRcharsetKorean
ISO-8859-11charsetThai
CompressionThe property values are as follows:
trueThe data sent is compressed.
noneThe data sent is not compressed.

Example:
Compression=true;
EncryptionThe property values are as follows:
noneNo encryption is performed.
rc5_16The connection between the server and the client computers is encrypted using an optimized 16-round RC5 encryption algorithm (128 bits).
aes128The connection between the server and the client computers is encrypted using a 128-bit AES encryption algorithm with the OFB mode of operation.
aes192The connection between the server and the client computers is encrypted using a 192-bit AES encryption algorithm with the OFB mode of operation.
aes256The connection between the server and the client computers is encrypted using a 256-bit AES encryption algorithm with the OFB mode of operation.
fastThe connection between the server and the client computers is encrypted using an optimized 128-bit encryption algorithm.

Example:
Encryption=fast;

Using the analysis in a connection to an HFSQL Classic database

For a connection to an HFSQL Classic database:
  • If the path of the WDD file is specified in the "Data Source" parameter of the connection string:
    • Only the files described in this analysis will be taken into account by the connection.
    • The links and the integrity rules described in the analysis are automatically taken into account.
  • If the path of the WDD file is not specified in the "Data Source" parameter of the connection string:
    • All the files found in the directory specified in the "Initial Catalog" parameter will be taken into account.
    • No integrity constraint is automatically respected between the files.

Remarks

  • During an access by the OLE DB provider for HFSQL, the automatic assistance windows of HFSQL are disabled.
  • The "Duration" items found in the HFSQL data files are returned as 8-byte integers by the OLE DB provider. The unit is the millisecond.
  • The array items are not supported by the OLE DB provider.
  • The queries with parameters are supported. This allows you to add HFSQL memos (binary memo for example).

Examples of OLE DB connection strings

  • Connection to an HFSQL Classic database without specifying the analysis:
    Provider=PCSOFT.HFSQL;Initial Catalog=c:\My HFSQL Database
  • Connection to an HFSQL Classic database specifying the analysis:
    Provider=PCSOFT.HFSQL;Data Source=c:\My HFSQL Database\MyAnalysis.wdd;
    Initial Catalog=c:\My HFSQL Database
  • Connection to an HFSQL Client/Server database:
    Provider=PCSOFT.HFSQL;Data Source=serverdb.mycompany.fr:4910;
    User ID=admin;Password=secret;Initial Catalog=MyDatabase
  • Connection to an HFQL Client/Server database with password-protected files that use the Russian character set:
    Provider=PCSOFT.HFSQL;Data Source=serverdb.mycompany.fr;
    User ID=user;Initial Catalog=MyRussianDatabase;
    Extended Properties="Password=*:secret1;
    Password=Fichier2:secret2;Language=KOI8-R"

    Remark: In this example, all the database files are protected by the password "secret1" except for "File2", whose password is "secret2".

Tree structure of data

The location specified in the connection string by Initial Catalog can contain data files located in subfolders. These data files are automatically declared by the OLE DB provider for HFSQL, replacing the "\" from the path with the "_" character.
For example, for the file "<Initial Catalog>\Archive\Product.fic", it can be consulted using "Archive_Product" as data file name.
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2023

Send a report | Local help