Solved

Poor DDL support in Microsoft access…

Posted on 2004-03-31
6
325 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 50

Expert Comment

by:Steve Bink
Comment Utility
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
Comment Utility
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 50

Expert Comment

by:Steve Bink
Comment Utility
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 4

Author Comment

by:JeePeeTee
Comment Utility
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 50

Accepted Solution

by:
Steve Bink earned 50 total points
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

763 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now