Solved

How many columns can I have in Access before I have problems

Posted on 2006-11-14
7
5,847 Views
Last Modified: 2008-01-09
I know I'll get flak for this comment, but I want to put nearly 200 columns into an Access table?  Can I do this safely?  Also, how many tables can an Access database have?  What is the capacity?
0
Comment
Question by:al4629740
7 Comments
 
LVL 35

Expert Comment

by:Raynard7
ID: 17943621
The limit is generally 255 columns.

200 will be fine - but may be slow to query
0
 
LVL 44

Accepted Solution

by:
Leigh Purvis earned 75 total points
ID: 17943704
As Raynard says - the ultimate limit is 255 per table.
As you say - you really shouldn't try to push that limit.
200 will indeed be reasonable - and will likely query fine.. (though you *might* experience some update lags with lots of data?)

As far as tables - that's less rigid.
There's the seemingly vague specification that an Access mdb can have 32,768 objects.
That's everything.  Tables, queries, forms, modules, hidden queries and tables...
You won't ever go anywhere near that limit (gawd I'd hope not) and you wouldn't necessarily know if you were close to it anyway.

Tables with lots of fields can be split up into multiple tables.
mdb's with lots of tables can be similarly split up into several mdbs.

I assume you're already good friends with normalization?
0
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 75 total points
ID: 17943708
Microsoft Access database specifications


Attribute                                            Maximum
Microsoft Access database (.mdb) (Microsoft Access database: A collection of data and objects (such as tables, queries, or forms) that is related to a particular topic or purpose. The Microsoft Jet database engine manages the data.) file size 2 gigabytes minus the space needed for system objects (system object: Database objects that are defined by the system, such as the table MSysIndexes, or by the user. You can create a system object by naming the object with USys as the first four characters in the object name.).
Number of objects in a database 32,768
Modules (including forms and reports with the HasModule property set to True) 1,000
Number of characters in an object name 64
Number of characters in a password 14
Number of characters in a user name or group name 20
Number of concurrent users 255

Table

Attribute Maximum
Number of characters in a table name 64
Number of characters in a field name 64
Number of fields in a table 255
Number of open tables 2048; the actual number may be less because of tables opened internally by Microsoft Access
Table size 2 gigabyte minus the space needed for the system objects
Number of characters in a Text field 255
Number of characters in a Memo field 65,535 when entering data through the user interface;
1 gigabyte of character storage when entering data programmatically
Size of an OLE Object field 1 gigabyte
Number of indexes in a table 32
Number of fields in an index 10
Number of characters in a validation message 255
Number of characters in a validation rule 2,048
Number of characters in a table or field description 255
Number of characters in a record (excluding Memo and OLE Object fields) when the UnicodeCompression property of the fields is set to Yes 4,000
Number of characters in a field property setting 255

Query

Attribute Maximum
Number of enforced relationships 32 per table minus the number of indexes that are on the table for fields or combinations of fields that are not involved in relationships
Number of tables in a query 32
Number of fields in a recordset 255
Recordset size 1 gigabyte
Sort limit 255 characters in one or more fields
Number of levels of nested queries 50
Number of characters in a cell in the query design grid 1,024
Number of characters for a parameter in a parameter query 255
Number of ANDs in a WHERE or HAVING clause 99
Number of characters in an SQL statement approximately 64,000

Form and report

Attribute Maximum
Number of characters in a label 2,048
Number of characters in a text box 65,535
Form or report width 22 in. (55.87 cm)
Section height 22 in. (55.87 cm)
Height of all sections plus section headers (in Design view (Design view: A window that shows the design of these database objects: tables, queries, forms, reports, macros, and data access pages. In Design view, you can create new database objects and modify the design of existing ones.)) 200 in. (508 cm)
Number of levels of nested forms or reports 7
Number of fields or expressions you can sort or group on in a report 10
Number of headers and footers in a report 1 report header/footer; 1 page header/footer; 10 group headers/footers
Number of printed pages in a report 65,536
Number of controls and sections you can add over the lifetime of the form or report 754
Number of characters in an SQL statement that serves as the Recordsource or Rowsource property of a form, report, or control (both .mdb and .adp) 32,750
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 22

Expert Comment

by:Flyster
ID: 17943749
>To Capricorn1

Thanks for the stats

Flyster
0
 
LVL 54

Assisted Solution

by:nico5038
nico5038 earned 50 total points
ID: 17944752
The max number of fields also depends on the length of the fieldnames. My table with 200 fields and names up to 8 characters did got corrupted when filled.
I would advise to use two 100 field tables and JOIN them on the Unique ID when all data is needed.

The 2GB max isn't realy a max as Access will allow to link tables from other databases, so using extra (backend) databases for your tables can stretch the application into multiples of 2GB.

Nic;o)
0
 
LVL 20

Assisted Solution

by:clarkscott
clarkscott earned 50 total points
ID: 17945627
I would seriously suggest creating several tables to handle your data.  You can have a one-to-one relationship between the data.

I have a system table that contains many columns.  Some of the columns were only used occasionally.  These columns went to a different table and only exist when needed.  This save space and query time.

It's a little more programming time, though.....

Scott C
0
 
LVL 44

Expert Comment

by:Leigh Purvis
ID: 17945651
Indeed, though that should happen as part of normalization process anyway.
It's good design.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now