"mishj" <mi***@yahoo.comwrote in news:1161460027.904701.254170
@b28g2000cwb.googlegroups.com:
Just want you all to know (just in case you have this issue) that some
standard sql doesnt work by default in MS ACCESS 2003 anymore (I didnt
know this, not sure if others do or not - and I couldnt find an answer
to my problem anywhere else on the internet)
I was getting a maddening syntax error on an alter statement that I
knew should work
ALTER TABLE [ARTICLE]
ADD COLUMN [APPROVED] CHAR(1) DEFAULT "N"
- it turns out its because 2003 defaults to "Access SQL" and you have
to switch it to Standard SQL syntax by doing the following..
Tools | Options | Tables/Queries | SQL Server Compatible Syntax (ANSI
92) |
<CheckThis database.
Do you think the JET of pre-2003 versions of Access uses Ansi 92 SQL by
default?
In any case instead of making the option change you recommend which can
influence all your SQL it may be less hazardous just to use OLE DB as
manifested in ADO as:
CurrentProject.Connection.Execute "ALTER TABLE [ARTICLE] ADD COLUMN
[APPROVED] CHAR(1) DEFAULT 'N'"
or to rewrite the SQL in a fashion that JET SQL can handle.
Persons who have Ansi 92 SQL experience, skill and knowledge might want to
make the change you suggest. There may be half-a-dozen who post here who
would be safe in doing so.
--
Lyle Fairfield