Home | Web Design | Programming | Fairlight CMI | Soap Box | Downloads | Links | Biography | About... | Site Map |
![]() |
![]() |
Finding End Of File |
CA-Clipper![]() |
Opportunities | Tips and Tricks | Networking | Internal Errors | Source Code | CA-VO |
![]() ![]() CA-CLIPPER NETWORKING |
In theory, CA-Clipper is compatible with dBASE files. In reality,
there are subtle differences that cause problems. One of the
problems is in the calculation of where the end of the DBF file is. Depending on the product, the end of the data in a DBF file can be calculated by:
When a file is used exclusively, CA-Clipper gets the file size from the header. When a file is opened shared, CA-Clipper finds the endpoint by looking at the dynamically maintained DOS file size. Other Xbase language products do not, leading potentially to disparity between the "perceived" sizes of the file. |
||||||
![]() |
When the value stored in the header differs from the actual number of
records (calculated from the file size), the file is considered to be
corrupted. The file should be copied in shared mode to ensure that
the DOS file size is used in calculating the number of records.
CA-Clipper will correct the header if the file is opened shared and a record is appended.
Nevertheless, CA-Clipper is able to detect the subtle differences between formats and work correctly in most cases. But there have been reports of "corrupted" tables if dBASE is used on a CA-Clipper table. Some consultants even specify in their support contracts that the contract will terminate if the customer ever uses dBASE on CA-Clipper tables. However, the DBU utility, which is written in CA-Clipper, removes the EOF character (1Ah) from the end of the file when records are appended in shared mode (the default). This behaviour is strange, because other CA-Clipper programs don't do this. Possibly, there is an interaction with the code that handles the tbrowse in DBU. The EOF character
is, however, maintained when DBU is run in exclusive mode (with
DBU /e ). The CA-Clipper browse() function (which is similar to the DBU
utility) works fine, whether shared or exclusive. So, if you come across a table that lacks the EOF character, it may be evidence that DBU was used to append records.
|
Home | Web Design | Programming | Fairlight CMI | Soap Box | Downloads | Links | Biography | About... | Site Map |
![]() |
![]() |
Send comments about this site to Greg at
gregh@ghservices.com All pages copyright © 1996-1999 GH Services Created 1997/06/09 Last updated 1999/09/30 All trademarks contained herein are the property of their respective owners |