Solved

Poor DDL support in Microsoft access…

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

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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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 50

Accepted Solution

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

803 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