Text field size (1 Viewer)

dsigner

Registered User.
Local time
Today, 18:22
Joined
Jun 9, 2006
Messages
68
MS documentation states that space is not reserved for unused characters in a text field. Does this mean that there is no storage penaly for having a text field 255 as opposed to 80.

On a more general note are there any tools to help calculate the size of a table?
 

Dennisk

AWF VIP
Local time
Today, 18:22
Joined
Jul 22, 2004
Messages
1,649
A text column will only store the characters and does not pad out the column so If your maximum length is 20 and you only enter 1 character then only one character is stored not one character and 19 spaces.
 

Moniker

VBA Pro
Local time
Today, 12:22
Joined
Dec 21, 2006
Messages
1,567
Dennis is correct in that text field sizes are more limits rather than anything else in Access. You limit to X characters if you want a maximum of X characters. Otherwise, extra spaces are not stored.

As for the size of the table, do you mean in kilobytes or something? The size of an individual object in Access doesn't really matter, and it's arbitrary since the contents can change and it stores superfluous information beyond the data you see (the data type, special formatting, input masks, etc.).
 

Dennisk

AWF VIP
Local time
Today, 18:22
Joined
Jul 22, 2004
Messages
1,649
The size of a table will vary because of what we have discussed in this post however you could calculate the max and min size of each row then find how many fit on a page (2k I think) then devide that into the number of rows and that will show the number of 2k pages
 

RoyVidar

Registered User.
Local time
Today, 19:22
Joined
Sep 25, 2000
Messages
805
True that ordinary text fields don't pad, but

1 - if you like, you can also create fixed width text fields, see for instance http://www.access-programmers.co.uk/forums/showthread.php?t=126837, which does pad ;)
2 - not that I'm 100% sure, but I think that the defined size is what's used when fetching the information, which might make a difference on slow networks. I don't have the possibility to do any reliable tests at the moment.
 

Users who are viewing this thread

Top Bottom