Too many fields defined

L

Luis

Hello.
I'm building a script that adds fields in a table if they are not defined yet.
Every field is of VARCHAR(10) datatype.

The problem i'm having is that i'm getting this "Too many fields defined"
error and there are only about 90 fields on the table.

Thanks

Luis
 
L

Linq Adams via AccessMonster.com

At 90 fields your table is about three times as big as is generally
acceptable, and in all probability means that your database is not normalized.
The number of fields and the fact that you have the need to add them
dynamically tends to suggest that you are attempting to, as John Vinson says
“to commit spreadsheet upon a database!" He generally adds this important
truism

"Fields are expensive, records are cheap"

Perhaps if you tell us exactly what you're doing we could provide you with a
better alternative.
 
J

John Spencer

Try compacting the database.

You are allowed a maximum of 255 fields in a table, but when you add a field
or modify a field Access uses one of the 255 field slots. If you delete the
field, the slot is still used up. When you compact the database, the number
of slots used is reset to the number of fields in the table.

That said, adding 90 fields to a table usually indicates a design problem.
Very rarely do tables exceed 20 fields in well-designed databases. I will
admit there are instances where many more fields are needed, but it is almost
always the case that a design change is needed.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
L

Luis

Compacting the database solved the problem.
I usually don't use this number of fields, but i'm building a parser to .txt
files that is going to be used by a telecommunications company owned by the
company where i work that is in another country.

The .txt files has more or less than 5 million records, so you can see that
there is a hard task. I already divide the output tables to 2.

Thanks.
 

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