Menu

#36 fields larger than 256 in CA-Clipper DB

v1.0 (example)
closed
None
5
2014-03-07
2013-01-08
John
No

In CA-Clipper character field lengths greater than 255 characters are represented by a combination of the Field_dec and the Field_len fields. The Field_len field stores the result of length % 256, while the Field_dec field stores the result of length / 256. Therefore, to calculate the actual field length of a character field you must check whether it has a value in the Field_dec > 0 and if it does, you set the length = Field_dec * 256 + Field_len.

As an example, I have a database with a 260 character field. The Field_dec = 1 and the Field_len = 4. Currently this library sees the field as being a 4 character field and truncates the field value. The example database is attached.

Discussion

  • John

    John - 2013-01-08

    Example of CA-Clipper based DBF

     
  • Joe McVerry

    Joe McVerry - 2014-03-07

    added in version 20140310

     
  • Joe McVerry

    Joe McVerry - 2014-03-07
    • status: open --> closed
    • assigned_to: Joe McVerry
    • Group: --> v1.0 (example)
     

Log in to post a comment.

MongoDB Logo MongoDB