Home | Sign in | English UK

  • Conditions for using HCancelDeclaration
  • HCancelDeclaration and closing the data file
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Allows you to:
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
// The Customer file was declared beforehand in the analysis
// by HDeclareExternal
<Result> = HCancelDeclaration([<File name>])
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurred. HError is used to identify the error.
<File name>: Optional character string (with or without quotes)
Corresponds to:
  • the name of data file (defined in the analysis). If this name is not specified, HCancelDeclaration refers to the last data file used.
  • the name of query or data source associated with a query (when freeing resources once HExecuteQuery or HExecuteSQLQuery has been used).

Conditions for using HCancelDeclaration

This function must be used ONLY when the relevant data file (or query) is not used anymore!
In the following example, HCancelDeclaration is used too soon: the table will be completely wrong. Indeed, BuildBrowsingTable (used to fill the table) is run in background task in a parallel process. Therefore, HCancelDeclaration will operate before the table is entirely filled, making this table unusable.
HExecuteSQLQuery("test", "select * from customer")
BuildBrowsingTable(TABLE_Table1, "test")
Note: The problem can also occur with a "data source" variable. A "data source" variable declared locally in a process (button click, procedure, method, etc.) ONLY exists during the execution of this code. For this reason, a "warning" is displayed when you are using this type of data source: "the data source will be destroyed at the end of this code".

HCancelDeclaration and closing the data file

To use HCancelDeclaration on a data file, this data file must be closed.
If a query, a sub-query or a view is using the data file, HCancelDeclaration cannot be run even after a call to HClose. The queries or views that are using the data file must be freed beforehand.
Component : wd250hf.dll
Minimum version required
  • Version 9
This page is also available for…
How to know when table has loaded.
Is there anyway to know when the browsing table process has completed so it would be safe to do the HCancelDeclaration function?
13 Jan. 2020