Search code examples
sizefielddbfesridbase

Changing DBF field size


I worked with ESRI shapefile format right now and i have some problem with changing/editing database field size. I created a field with 200 length/size and now i want it to only 80 length/size (space & other improvement).

However i can't edit field size anymore :( can somebody point out how to change the field size?

Btw i have tried utilities such as DBF Explorer which can edit field size, but when i change field size on char/text field, data on float/numeric field get deleted :(
DBF Explorer

PS: ESRI database use .dbf extension, which i think it was DBASE III plus or DBASE IV format


Solution

  • You can edit the header of the file to change it with any hexadecimal editor.

    byte 10-11: represents the lenth of a record (least significant byte first)

    starting at byte 48 a repeated structure (48 bytes each) describing the field. The byte 33 of this structure represent the length.