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 Client/Server functions
  • Deleting a data file
  • Names of files and directories on the LINUX server
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Deletes HFSQL data files (.fic, .ndx, .ftx, .sdx and .mmo files, if any) from the server.
Example
MyConnection is Connection
// Deletes a data file from the server 
IF HDeleteFile(MyConnection, ".\save\fileclient_sov.fic") = False THEN
	Error(HErrorInfo())
END
// To delete a file in the database directory
// HDeleteFile(MyConnection, "Client.FIC")
Syntax
<Result> = HDeleteFile(<Connection> , <Data file path> [, <Options>])
<Result>: Boolean
  • True if the data file was deleted,
  • False if an error occurred (the data file does not exist on the server for example). HError is used to identify the error.
<Connection>: Character string or Connection variable
Connection in which the data file must be deleted. This connection corresponds to:
<Data file path>: Character string
Physical name and path of the data file to delete. The path is relative to the database: the database name must not be specified in the path.. The ".fic" extension of the data file must be specified.
<Options>: Optional Integer constant (or combination of constants)
By default, when deleting a data file:
  • the files corresponding to the logs are not deleted,
  • the files corresponding to the transactions are deleted.
This parameter is used to modify this behavior:
hDeleteLogDeletes the Log file and all the logged operations associated with the deleted data file.
hDestroyLinkDeletes all links related to the deleted data file.
hKeepTRSKeeps the transaction file associated with the deleted data file.
Remarks

Deleting a data file

The data file can be deleted only if it is not currently used (which means if it is not used by a query, a view, another window, a thread or a component with independent HFSQL context).
The data file is automatically closed in the HFSQL context that calls HDeleteFile. A WLanguage error occurs if the data file is used in a context or by an application.

Names of files and directories on the LINUX server

On a LINUX server, the names of data files (.fic, .ftx, .sdx, .ndx and .mmo files, if any) must be in lowercase and must not contained accented characters.
Component: wd300hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/15/2024

Send a report | Local help