Re: Referential Integrity
Posted by: Michael G. Zinner
Date: June 01, 2005 04:48PM

The MS Access ODBC driver does not support this functionality.

I have added direct selects to the MS Access System Tables to retreive the information. It is included in the patch below.

Please extract them to .\bin\windows\java\com\mysql\grt\modules and overwrite the existing files there.

Please make sure to enable full access to the Access system tables like explained in the documentation.

To check the the foreign keys are migrated, press the [Advanced >>] button in the Manual Editing page and select a migrated table (you may need to change the Filter to Show All Objects). Then you can inspect the SQL command. Example:

CREATE TABLE `NordwindEx`.`Artikel` (
`Artikelname` VARCHAR(40) NULL,
`Lieferanten-Nr` INTEGER(10) NULL,
`Kategorie-Nr` INTEGER(10) NULL,
`Liefereinheit` VARCHAR(25) NULL,
`Einzelpreis` DECIMAL(19, 4) NULL,
`Lagerbestand` SMALLINT(5) NULL,
`BestellteEinheiten` SMALLINT(5) NULL,
`Mindestbestand` SMALLINT(5) NULL,
`Auslaufartikel` TINYINT(1) UNSIGNED NOT NULL,
PRIMARY KEY (`Artikel-Nr`),
INDEX `ArtikelKategorie-Nr` (`Kategorie-Nr`),
INDEX `Artikelname` (`Artikelname`),
INDEX `KategorienArtikel` (`Kategorie-Nr`),
INDEX `Kategorie-Nr` (`Kategorie-Nr`),
INDEX `LieferantenArtikel` (`Lieferanten-Nr`),
INDEX `Lieferanten-Nr` (`Lieferanten-Nr`),
CONSTRAINT `LieferantenArtikel` FOREIGN KEY `LieferantenArtikel` (`Lieferanten-Nr`)
REFERENCES `NordwindEx`.`Lieferanten` (`Lieferanten-Nr`)

As you can see, this CREATE TABLE statement features a CONSTRAINT.


Michael Zinner, Team Lead, Developer Tools

Are you MySQL certified?

Edited 1 time(s). Last edit at 06/01/2005 04:49PM by Michael G. Zinner.

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.