Re: changing table structure
I want to change the field definition of an existing field.
This has worked in the past (with Access):
eg.
SQL = "ALTER TABLE myTable ALTER myField DOUBLE NOT NULL"
I have an existing VARCHAR(50) NULL field which I want to change to NOT NULL. This works OK :
SQL = "ALTER TABLE myTable ALTER myField VARCHAR(50) NOT NULL"
when I run the query from within access but when I run it via code, I get SQL syntax error. I know the query is identical bcz I am copying and pasting the SQL. The connection to the database is OK as I tried a drop table query via code which worked fine.