Tomek wrote:
Quote:
How from Visual Basic 6 copy whole btrieve file to another
(in DOS mode is commant "butil -copy file.btr file.btr")
How make the same from inside program (API 32 ) |
The BUTIL -COPY function is actually quite simple. Here's the logic if
you want to implement your own version:
Open SourceFile
Open DestFile
Status=StepFirst(SourceFile) [you could also use GetFirst(SourceFile,
Key 0)]
While (Status = 0)
Status=Insert(DestFile)
Status=StepNext(SourceFile)
WEnd
Of course, you may want some error handling around the Insert, and
perhaps a way to indicate the failure code if you run into any errors.
Also, you may wish to handle records larger than 64K, so you may need to
use chunking...
Or, you can just SHELL out to BUTIL, I suppose.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: March, 2004: See our web site for details!