PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Use conditions
  • Deleting records in a Table or TreeView Table control based on a data file
  • Referential integrity and Table or TreeView Table controls based on a data file
  • Deleting records in a Table control based on a data file and Trigger
  • Handling errors
  • Locking the linked data file
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
Deletes the selected rows from a Table or Treeview Table control.
Versions 19 and later
WEBDEV - Browser code This function is now available in Browser code for Table controls in browser mode.
New in version 19
WEBDEV - Browser code This function is now available in Browser code for Table controls in browser mode.
WEBDEV - Browser code This function is now available in Browser code for Table controls in browser mode.
Example
// Deletes all selected rows
IF YesNo("Do you really want to delete the selected customers?") THEN
TableDeleteSelect(TABLE_Customer_Display)
END
Syntax
TableDeleteSelect(<Table control>)
<Table control>: Control name
Name of the control to be used. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
Remarks

Use conditions

TableDeleteSelect can be used on:
  • a Table or TreeView Table control based on a data file.
  • a Table or TreeView Table control populated programmatically.
  • a single-selection or multi-selection control.
    WEBDEV - Server codePHP Reminder: Multi-selection is not available for Table controls in classic mode.
WEBDEV - Server codePHP This function is available for Table controls in Ajax mode, Table controls in classic mode and TreeView Table controls.
WEBDEV - Browser code This function is available for Table controls in browser mode only. The TreeView Table control is not available.

Deleting records in a Table or TreeView Table control based on a data file

TableDeleteSelect deletes the corresponding records from the data file associated with the control. If items are linked to other data files, no modification is automatically performed on these linked data files.

Referential integrity and Table or TreeView Table controls based on a data file

If the management of referential integrity is enabled (HSetIntegrity), HErrorIntegrity must be called after TableDeleteSelect to check the integrity. If an integrity error is detected, the row is not deleted and it remains visible in the control.

Deleting records in a Table control based on a data file and Trigger

You have the ability to activate a trigger when deleting a record from a Table control based on a data file. For more details, see the documentation about HDescribeTrigger.

Handling errors

The ErrorOccurred variable is set to True if the deletion fails. To get the details of the error, use ErrorInfo.

Locking the linked data file

If the data file is locked in the current process, TableDeleteSelect deletes the specified row and unlocks the data file.
Component: wd270obj.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment