ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • When to use HBuildKeyValueANSI?
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
HBuildKeyValueANSI (Function)
In french: HConstruitValCléANSI
HFSQL ClassicHFSQL Client/ServerAvailable only with these kinds of connection
Regardless of the platform used, the data stored in the HFSQL files is in ANSI format.
On a UNICODE platform, HBuildKeyValueANSI builds the value of a composite key to store it in an HFSQL data file.
On an ANSI platform, this function is equivalent to HBuildKeyValue.
HBuildKeyValueANSI must not be used to:
For the filters or searches, use HBuildKeyValue.
Reminder: The composite keys are binary strings whose content cannot be displayed directly. For more details, see Composite keys.
Example
// Assign an item in a linked data file
Invoice.CustLastNameFirstName = HBuildKeyValueANSI(Customer, ...
CustLastNameFirstName, Customer.LastName, Customer.FirstName)
Syntax
<Result> = HBuildKeyValueANSI(<Data file> , <Composite key> , <Value of components>)
<Result>: Character string
Value of the composite key to be stored in the data file.
<Data file>: Character string
Name of HFSQL data file used.
<Composite key>: Character string
Name of the item corresponding to the composite key.
<Value of components>: Character string
Value that will be assigned to each component of the composite key.
This parameter has the following format: <Component 1> , <Component 2>, ...,<Component N>.
For example: "MOORE", "Vince".
Remarks
HFSQL Classic

When to use HBuildKeyValueANSI?

HBuildKeyValueANSI can be used to store the value of a composite key used as a link key in a data file.
Example:
To add a new invoice in a UNICODE platform, use the following code:
Invoice.InvoiceNum = ...
...
Invoice.CustLastNameFirstName = HBuildKeyValueANSI(Customer, ...
CustLastNameFirstName, Customer.LastName, Customer.FirstName)
...
HAdd(Invoice)
Business / UI classification: Business Logic
Component: wd290hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help