Bytes Per Row

  • Thread starter bhipwell via AccessMonster.com
  • Start date
B

bhipwell via AccessMonster.com

I understand that a row within a query (or table) can only contain 2000 bytes
of information before reaching the "too many fields defined" error. How do
you determine how many bytes any particular row in a query is taking up?

B
 
A

Allen Browne

There is not a simple answer to your question:
- Some fields are fixed width (e.g. Long Integer always takes 4 bytes.)

- Some are variable width (e.g. Text takes only the number of characters.)

- Some field types are just addresses (e.g. a memo, hyperlink, and OLE
Object contribute only about 10 bytes each.)

- Depending on language, some fields may be compressed with Unicode
Compression (property in lower pane of table design.)

- In some versions of Access, the limit is 4k rather than 2k (though
according to the Help file the actual number is affected by Unicode
Compression.)

To ensure that you do not set up a table that could go over the limit if the
user filled up all the fields, you could programmatically loop through the
Fields and sum their Size property. There's a utilitity that performs this
check (among others) here:
Database Issue Checker
at:
http://allenbrowne.com/AppIssueChecker.html

If you need an example of how to do that, copy the IsTooWide() function from
the sample database.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top