View Full Version : Alter table . . . modify . . problem


Robjoy
04-01-2008, 12:50 PM
I'm importing dbase tables, then trying to tidy them up. The following works fine:

db.Execute "ALTER TABLE WSI_Orders DROP COLUMN SHIPATTN;"
- and many others like it, but this has no effect:

db.Execute "ALTER TABLE WSI_ORDERS MODIFY DELIVERYNO INT;"

What could be wrong? Is it that I can't alter the data type property after it's been created, because it is a read-only property? If so, I'm curious to know how Alter table . . modify . . could ever work.

I can think of another way to get numeric versions of the fields I need - add a field, update query - but I'm trying to make this mdb leaner and more efficient than my previous bloatware!

pbaldy
04-01-2008, 01:10 PM
Try

ALTER TABLE WSI_ORDERS ALTER COLUMN DELIVERYNO INT

Robjoy
04-01-2008, 01:28 PM
Thank you!

I spent ages trying to figure that out - why did I think it was 'modify'?

jdraw
04-01-2008, 02:37 PM
Thank you!

I spent ages trying to figure that out - why did I think it was 'modify'?

Here's a useful link to Access SQL
http://msdn2.microsoft.com/en-us/library/aa140015.aspx

Robjoy
04-02-2008, 03:45 AM
That's just the sort of site I've been hunting for, you're a star.