ALTER COLUMN does not seem to convert datatype to LONG

3.1k views Asked by At

I'm trying to update my field data types. It seems to keep it as just an integer and I cannot update my database because the numbers are too large. I might just do the datatypes as Double if I can't get it to convert to long.

Here's the sql code I'm using for MS Access: ALTER TABLE Flows ALTER COLUMN Softener2 LONG

1

There are 1 answers

0
Gord Thompson On

The ALTER TABLE statement you cited in your question does work. If I start with a table definition where [Softener2] is Integer...

Flows1.png

...and then close the table and run the following code...

Sub foo()
Dim cdb As DAO.Database
Set cdb = CurrentDb
cdb.Execute "ALTER TABLE Flows ALTER COLUMN Softener2 LONG", dbFailOnError
Set cdb = Nothing
End Sub

...the column is indeed changed to Long Integer

Flows2.png