How to Delete Multiple Records in one Go with Database Explorer?
by
, 31-Jul-2009 at 02:34 AM (6616 Views)
Once in a while we get the question how can I delete multiple records with Database Explorer. In this blog I will tell you what your options are.
From the initial revision up there is a function called "Erase all Data". You can find this on the File pulldown. The option is not enabled by default because Database Explorer will configure itself in its most defensive state. Via the configuration dialog you can - when you have dbAdmin rights (Studio users have this option set) - allow yourself a zerofile operation. Erase all data is a single user activity and Database Explorer attempts to open the table in exclusive mode. The option works fine in development but is less useful in a multi user deployed environment.
Also available since the beginning is the ability to hold the Shift+F2 key down while the datagrid has the focus. However this does not work without a small modification of the configuration again. To let this work you need to disable the delete confirmation question.
Starting with Visual DataFlex 2008 (14.1) Database Explorer also has a delete all records button in the toolbar. The button becomes available when the option to erase all data is enabled via the configuration dialog. Yes, the same flag for zerofile. The difference between this button and the zerofile is that it simulate the Shift+F2 action AND it respects a filter. With a filter you can set the conditions. For example only those records created before a certain date. In order to speed up the process I advise to limit the number of columns and rows in the datagrid. The less information that needs to be updated on the screen the faster the operation is finished.