PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Deleting records from a query
  • Deleting records from a HFSQL view
  • Deleting records from a transaction
  • Benefits compared to a loop for deleting records
  • Benefit compared to the use of HCreation
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
HDeleteAll (Function)
In French: HSupprimeTout
ODBCNot available with this kind of connection
Deletes all records from a data file, a HFSQL view or a query. The records are deleted logically and physically. They cannot be restored.
The following operations are performed:
  • the records are deleted: the records are not referenced in the index anymore. The data is not kept.
  • the indexes (corresponding to the keys of the records) are deleted from the index file.
  • the memos associated with the records are deleted from the memo file.
  • the automatic identifiers are re-initialized.
Caution: the integrity is not checked.
WINDEV, WINDEV Mobile and WEBDEV propose an automatic management of errors for the following types of errors: Duplicate error, integrity error, password error, modification conflict error and status error during modification conflict, lock error. See Assisted management of HFSQL errors for more details.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the 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.
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
AndroidAndroid Widget Java This function is available for the data files or queries linked to a HFSQL connection (Classic or Client/Server).
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 This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
AndroidAndroid Widget Java This function is available for the data files or queries linked to a HFSQL connection (Classic or Client/Server).
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 This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
AndroidAndroid Widget Java This function is available for the data files or queries linked to a HFSQL connection (Classic or Client/Server).
Note: From version 19, HFSQL is the new name of HyperFileSQL.
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.
Example
// Clears the file without re-creating it
HDeleteAll(Customer)
Syntax
<Result> = HDeleteAll(<File Name>)
<Result>: Boolean
  • True if the records have been deleted,
  • False if a problem occurred (locked record, record in transaction, ...). HErrorInfo is used to identify the error.
<File Name>: Character string (with or without quotes)
Name of HFSQL data file, HFSQL view or query used.
Remarks

Deleting records from a query

If the query was created by using the hModifyFile constant, HDeleteAll deletes the records from the source of the query.

Deleting records from a HFSQL view

HDeleteAll deletes the records from the view but it does not delete the records from the data file used for the view.

Deleting records from a transaction

HDeleteAll does not delete the records found in a transaction (canceled or validated).

Benefits compared to a loop for deleting records

To delete the records from a data file, you also have the ability to perform a loop for deleting records (HDelete). For example:
FOR EACH CustNum OF Orders
        HDelete()
END
Using HDeleteAll presents the following benefits:
  • the process is faster
  • the size of empty data file is smaller.

Benefit compared to the use of HCreation

To delete the records from a data file, you also have the ability to use HCreation.
Using HDeleteAll presents the following benefits:
  • Deletion possible even if users are connected to the data file.
  • Automatic management of HFSQL errors.
Components
WINDEVWEBDEV - Server code wd230hf.dll
Windows Mobile wp230hf.dll
Java wd230java.jar
Linux wd230hf.so
Android wd230android.jar
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment