Poor DDL support in Microsoft access…

Poor DDL in Microsoft access…

Why can’t I use this DDL?

create table Currency
    CurCode              Text(3)         not null,
    CurName             Text(35),
    Memo                 Memo,       
constraint PK_CURRENCY primary key (CurCode)

The table name currency is not allowed within DDL and also the column name memo is not accepted. When I change those names into CCurrency and Memo into Comment, I can execute the DDL. When I enter into designer mode I can change those names back into Currency and Memo again. Why the difference between DDL and a real hand job?

Also cascade delete and update can not be defined within DDL?

Any work around?
Who is Participating?
Steve BinkConnect With a Mentor Commented:
Yeah, you can USE those field names, but it is not recommended, and likely to cause errors in areas that are built to look for them.  From within Access, not a problem since you can always put [Currency] to make sure it knows it is a field name.
Steve BinkCommented:
Currency and Memo are reserved words for those data types.  You should always avoid using those names as field names.  The best result is confusion when you look at the code; the worst, a crash.

Is there a reason you need to do this using DDL?
JeePeeTeeAuthor Commented:
Hello Routunet...

Yes I make use of Power Designer from where I generate the database. This is also the place where I design and modify the defintions. This tool can make DDL scripts or generate the database by an ODBC connection and generates it on the fly!

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Steve BinkCommented:
handy tool indeed!  Have you tried using the ODBC method?  Does this present the same problems?

I'll admit, I'm not familliar with DDL at all, but ODBC I can do, and it meshes with ADO constructs inside Access as well.
JeePeeTeeAuthor Commented:
ODBC uses DDL and shows the same problems and limitations.

Strange enough, when you make use of the access designer, you can rename the table back into currency and the field back into memo.
I have found that if you put brackets around table/field names, you can get away with a lot in Access and SQL Server.  

Just my two cents worth...maybe only a penny.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.