ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Closing the tables and the connection
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
Closes a data file or all the data files opened by the current user: all the corresponding physical data files are closed for the current user. For the HFSQL data files, the following files are closed:
  • the data file (.FIC),
  • the index file (.NDX) if it exists,
  • the memo file (.MMO) if it exists.
  • the full-text index file (.FTX) if it exists.
When closing the data file:
  • The locks (on the data file and/or some of its records) are unlocked.
  • The filters defined on the data file with HFilter are automatically deleted.
  • The current iterations on the data file are canceled.
  • The current searches on the data file are canceled.
Once the data file is closed, the reassignments performed by HChangeName, HChangeDir and HSubstDir are kept.
If a query was executed on the data file, HCancelDeclaration must be called on the query in order for the closing to be effective.
Example
// Close the "Supplier" data file
HClose(Supplier)
IF NOT HClose("") THEN
Error("Problem when closing data files")
END
Syntax
<Result> = HClose([<Data file>])
<Result>: Boolean
  • True if the data file was closed,
  • False otherwise. HError returns more details about the problem.
<Data file>: Optional character string
Name of data file to close.
If this name is not specified, HClose will close the last data file used by the last HFSQL management function (function starting with "H").
If this parameter is equal to "*" or if it corresponds to an empty string (""), all the opened data files will be closed.
This parameter can also correspond to the name of a group of files (or custom-folder) defined in the analysis (not available in Android and Android widget).
Remarks

Closing the tables and the connection

When all the tables that use the same connection (tables opened on the same database with the same connection parameters) are closed, the connection is automatically closed.
To close a connection, use HCloseConnection.
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