Board index » delphi » Delphi 2, dBASE, and function DbiPackTable

Delphi 2, dBASE, and function DbiPackTable

Anyone know where I can find some information and possibly an example of
this function?  The bde32.hlp file is not really of any use.

 

Re:Delphi 2, dBASE, and function DbiPackTable


Quote
Taille (rou...@netinc.ca) wrote:

: Anyone know where I can find some information and possibly an example of
: this function?  The bde32.hlp file is not really of any use.

Just in case it helps, I just had to do something similar
calling the BDE from Paradox.  What I had to do was first
do a setExclusive() on the table before I could pack it.
--
============================================================
Rick Carter   carte...@email.uc.edu   rcar...@tso.cin.ix.net
============================================================

Re:Delphi 2, dBASE, and function DbiPackTable


To all the generous people:
Thanks for all of your help, I was also able to find a solution at the
Borland site's Delphi FAQ.

Re:Delphi 2, dBASE, and function DbiPackTable


I've been asked to reply with the solution to my dilemma, here it goes.
It is also available at  (along with many other technical information pages)
http://www.borland.com/devsupport/delphi/ti_list/TI2873.html

2873 packing a dBASE table

Q:  How do I pack a dBASE table?
A:  To pack a dBASE table that has been opened with a TTable,
use the BDE function DbiPackTable.  There are two basic steps
to do this:
1. Add the following units to your uses clause:
{ For Delphi 1.0: } DBITYPES, DBIPROCS and DBIERRS;
{ For Delphi 2.0: } BDE;
2) Then call the DbiPackTable BDE function as follows:
Check(DbiPackTable(Table1.DbHandle, Table1.Handle, Nil, szDBASE, TRUE));
Notes:
* The table must be opened in exclusive mode.
* Use the Check procedure when calling BDE API functions.  Check
  will raise an exception if an error occurs on the BDE call.

        TI
DISCLAIMER: You have the right to use this technical information subject to
the terms of the No-Nonsense License Statement that you received with the
Borland product to which this information pertains.

Other Threads