key length of 100 char.

K

KBDB

Hi,
I have always learn that you do not make a key with the length of 100
characters because it uses too much internal memory to process and slows the
system down. Is this still true with SQL and VBA? What suggestions would
you have me give my client? They want the part number to be 100 char.

Thank you,

Kathleen
 
T

Tom van Stiphout

On Mon, 28 Apr 2008 06:25:01 -0700, KBDB

Let them do it. PartNo is not a good PK anyway, because it may change
over time. You may say Cascade Update but I say too much risk.
Therefore add a PartID autonumber, and use it as the PK. It will
always be hidden, never shown on any form or report. It is simply
there to provide structure to your db (it is used as Foreign Key in
several related tables).

-Tom.
 
K

KBDB

Tom,

I like that ideal but I have just one more question. I have set up a
auto/number before and when I tried to import data from Excel, I kept getting
a subscript out of range error. I could not figure out how to do this. We
are loading all the files from Excel speadsheets. For the auto/number field;
I made Excel spreadsheet field a format of number with no decimal. I started
at 1 and went up. What did I do wrong?

Thank you,

Kathleen
 
T

Tom van Stiphout

On Mon, 28 Apr 2008 07:27:01 -0700, KBDB

Not sure that error was related. Subscript refers to an array index:
dim x(5) as string
for i = 1 to 10
debug.print x(i) 'will get error at x=6
next i

Also, autonumbers don't have to be imported, their values will be
auto-created when you import PartNo etc.

Last resort you import to a "temp" table with very loose restrictions,
and if the data is good, you copy that data to the production table
with an Append query.

-Tom.
 
Top