View Full Version : Field lengths don't impact Table Size


ions
09-28-2006, 07:12 PM
I just discovered that field lengths don't influence table size because Access doesn't pad fields.

A text field with length 20 or 255 doesn't impact the size of the table, just the data in the field does.

I did a test to confirm this.

This blew me away.

So now I ask why do we specify field length for text fields?

The_Doc_Man
09-29-2006, 06:23 AM
Because report wizards can use the information to size fields for you. Ditto, form wizards. Ditto, import/export wizards dealing with pre-defined tables.

Also, if you convert an Access DB to an ORACLE or SQL Server DB, that information is useful.

Finally, if you are implementing something according to a government standard, maximum field size is absolutely required in order to comply with design review requirements.

I can thing of more reasons, but those should help you understand. Oh... one more thing to consider. Adding up MAXIMUM field sizes is important for you to decide whether a record could ever overflow the 2Kb limit on record buffers.