Can't change data type

N

neeraj

I had a table to which I appended records. Now I have to change the datatype
of one of the fields and it says "insufficient memory". My db is 444KB. I
have tried compacting it.
 
D

Douglas J Steele

You might be best off creating a new table that has the correct data type in
it, then append the data from the existing table. In that way, you won't end
up making as many copies as Access does behind the scenes when you attempt
to change a data type.

Of course, that probably won't work if your table is involved in
relationships with other tables. You can't, of course, change the data type
of a field that's involved in a relationship. For other fields, add a new
field of the correct type, run an Update query to populate the new field
from the old field, then delete the old field when you're sure the data was
transferred correctly.
 
N

neeraj

I created a new table with correct data type and it did work with append
query. I was a bit surprised though because I thought that the source table
and the destination table have to have the same data type in corresponding
fields in an append query
 
D

Douglas J. Steele

Jet will try to coerce values. It'll usually only complain if it can't do
the conversion.
 
Top