PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • Conditions for using HCancelDeclaration
  • HCancelDeclaration and closing the data file
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Allows to:
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
// The Customer data file was declared beforehand in the analysis
// by HDeclareExternal
HClose(Customer)
HCancelDeclaration(Customer)
Syntax
<Result> = HCancelDeclaration([<Data file>])
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurred. HError is used to identify the error.
<Data file>: 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 a query or a data source associated with a query (case of a resource release following the use of the HExecuteQuery or HExecuteSQLQuery functions).
Remarks

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 content of the Table control will be completely distorted. Indeed, BuildBrowsingTable (used to fill the Table control) is run in background task in a parallel process. Therefore, HCancelDeclaration will be called before the table is entirely filled, making this table unusable.
HExecuteSQLQuery("test", "select * from customer")
BuildBrowsingTable(TABLE_Table1, "test")
HCancelDeclaration("test")
Remark: The problem can also occur with a "data source" variable. A "data source" variable declared locally in a process or event (button click, procedure, method, etc.) ONLY exists while this code is run. 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, subquery or view uses the data file, the function HCancelDeclaration cannot be executed even after a call to the HClose function. . The queries or views that are using the data file must be freed beforehand.
Component: wd260hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
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?
Alan
13 Jan. 2020