Entry
Delphi: Database: Table: Delete: Pack: How to physically delete records from a table?
Nov 18th, 2003 04:39
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 18 November 2003 - 01:32 pm -------------------
Delphi: Database: Table: Delete: Pack: How to physically delete
records from a table?
---
The BDE includes a function to pack dBASE tables, called DbiPackTable
().
Add the following units to your USES clause:
DBITYPES,
DBIPROCS and
DBIERRS.
---
Then call the BDE function as follows:
DBIPackTable( Table1.DbHandle, Table1.Handle, 'TABLENAME.DBF',
szDBASE, TRUE );
Note: The table must be opened in exclusive mode.
---
Note that before you can pack the Paradox table, the table's cursor
handle must be closed, otherwise you would get a 'Table in use' error.
---
---
Internet: see also:
---
Top 10 Tricks for Delphi and C++Builder VCL Database Developers by Cary
http://community.borland.com/article/0,1410,20563,00.html
---
Delphi: Database: Table: Manually: How to
Sort/Restructure/Rename/Copy/Add/Delete/Restructure?
http://www.faqts.com/knowledge_base/view.phtml/aid/23917/fid/175
----------------------------------------------------------------------