|
Question : ALTER TABLE / ALTER COLUMN QUESTION???
|
|
Using Access 2k, neither one of the following ALTER TABLE statements will add and change the YESNO Default to Yes.
dbs.Execute "ALTER TABLE POOL_DATA ADD COLUMN TRACK_POOL YESNO DEFAULT YES;"
dbs.Execute "ALTER TABLE POOL_DATA ALTER COLUMN TRACK_POOL YESNO DEFAULT YES;"
I want to add the field TRACK_POOL with a Default of Yes.
Any help will be appreciated.
ET
|
|
Answer : ALTER TABLE / ALTER COLUMN QUESTION???
|
|
2 trials ALTER TABLE POOL_DATA ALTER COLUMN TRACK_POOL YESNO DEFAULT "-1"
OR
Dim strSQL As String strSQL = "ALTER TABLE POOL_DATA ALTER COLUMN TRACK_POOL YESNO;" CurrentDb.Execute strSQL CurrentDb.TableDefs("POOL_DATA").Fields("TRACK_POOL").DefaultValue = -1
jaffer
|
|
|