ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Syntaxes according to the values to convert
  • Using HConvertX (method kept for backward compatibility with WINDEV 5.5)
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
HConvertX (Function)
In french: HConvertX
HFSQL ClassicHFSQL Client/ServerAvailable only with these kinds of connection
Converts a numeric value into a binary string in order to perform a search on a numeric key. Enables you to compose a key consisting of one or more numeric items..
File description in the data model editor
HBuildKeyValue must be used to perform searches on the composite keys for data files that use "Mode 7" to manage spaces in text items. For more details, see Composite keys.
Warning
These functions are kept for backward compatibility to migrate the applications developed in WINDEV 5.5 and WEBDEV 1.5.
Example
// CleComp est composée de REFPROD (texte) et QTE (entier)
// SAI_Quantité et SAI_RefProduit sont deux champs de saisie
Rech is string
HConvertE(Rech, SAI_Quantité)
Rech = Complète(SAI_RefProduit, 8) + Rech
HReadSeek(Commande, CleComp, Rech)
Syntax
<Result> = HConvertX(<Text Variable> , <Numeric value>)
<Result>: Boolean
  • True if no problem occurred,
  • False if an error occurs. HError is used to identify the error.
<Text Variable>: Ansi Character String variable
Variable to which the conversion result will be assigned. This variable must have a sufficient size and it will be filled with space characters.
<Numeric value>: Numeric variable or numeric value
Value to convert.
Remarks

Syntaxes according to the values to convert

HConvertC(<string>,<Short integer>)
HConvertD(<string>,<Double real>)
HConvertE(<string>,<Integer>)For backward compatibility with WEBDEV 1.5, this function handles integer_55 on 2 bytes.
HConvertL(<string>,<Long integer>)We recommend that you use HBuildKeyValue.
HConvertM(<string>,<Currency>)
HConvertP(<string>,<Turbo real>)For backward compatibility with earlier versions, this function is identical to HConvertD.
HConvertR(<string>,<Simple real>)
HConvertU(<string>,<Unsigned integer>)For backward compatibility with earlier versions, this function handles integer_55 on 2 bytes.
HConvertV(<string>,<Signed 1-byte integer>)
Tip: It is recommended to use Convert instead of HConvertX since it is much easier to manipulate.

Using HConvertX (method kept for backward compatibility with WINDEV 5.5)

To build the value of a composite key without using HBuildKeyValue, you must:
  • entirely fill the text components with the hMinVal constant.
  • convert the numeric components with HConvert.
Example:
MaCléComposée = Complète(Client.Nom, Dimension(Client.Nom), hMinVal) + ...
Complète(Client.Prénom, Dimension(Client.Prénom), hMinVal)
Remarks:
  • The hMinVal constant is equivalent to Charact(0).
  • The hMaxVal constant is equivalent to Charact(255).
For more details on how to use composite keys on filters, see Composite keys and filters.
Component: wd290hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/05/2023

Send a report | Local help