?
Solved

Poor DDL support in Microsoft access…

Posted on 2004-03-31
6
Medium Priority
?
336 Views
Last Modified: 2008-03-06
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?
0
Comment
Question by:JeePeeTee
  • 3
  • 2
6 Comments
 
LVL 51

Expert Comment

by:Steve Bink
ID: 10727592
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?
0
 
LVL 4

Author Comment

by:JeePeeTee
ID: 10727663
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!

0
 
LVL 51

Expert Comment

by:Steve Bink
ID: 10727699
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Author Comment

by:JeePeeTee
ID: 10727846
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.
0
 
LVL 51

Accepted Solution

by:
Steve Bink earned 200 total points
ID: 10728467
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.
0
 
LVL 18

Expert Comment

by:Data-Man
ID: 10728692
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.

Thanks,
Mike
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question