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
Do NOT edit the header, the data is aligned by fixed offset, and changing the size of the field to something that doesn't match the physical length of the record WILL corrupt your table.
You'll need something that can read/write DBFs to effectively do this. An old install of DBase will work, although you would be better off with Visual FoxPro (the FoxPro command would be MODI STRU which is short for "MODIFY STRUCTURE"). I would also look at other tools to push/pull the data into other formats. If you have access to Access (pardon the pun), you could always import the data in to Access as an Access table, restructure the table, then export it out, although starting with Access 2007, native DBF/FoxPro support has been more or less removed, requiring ODBC. Other (more time consuming) measures would be to:
To edit the field size in a .dbf file I use OpenOffice. In OpenOfficeSpreadsheet the .dbf feild name would be presented as "FEILDNAME,C,200". To change the size from 200 -> 80 you would have to schange the field name to: "FEILDNAME,C,80" and then save the .dbf file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With