PDA

View Full Version : Question about field length



Benzadeus
03-01-2011, 05:49 AM
Hello,

Let's suppose I have a field Name (Text - 50 characters) and I have a record - let's say - Felipe (6 characters).

What's the SPACE occuped by this field? 50 or 6 bytes?

I might say that after DB Compression, it would not practically have difference, but this is just one thing I got curious about.

hansup
03-01-2011, 05:58 PM
When you define a field as Text(50), 50 is the upper limit. The space consumed by storing a value depends on the number of characters in that value.

Felipe is 6 characters. Access handles text as double-wide (Unicode) characters, so uses 2 bytes per character. Those 6 characters will consume 12 bytes of storage.

Benzadeus
03-02-2011, 06:19 AM
Thank you. Good remembering about unicode (2 bytes) characters.