J
Jamie Collins
Is it possible to create a Jet 4.0 FOREIGN KEY with SET NULL for the ON
UPDATE and ON DELETE rules?
I've seen it mentioned in two Microsoft documents:
http://support.microsoft.com/default.aspx?scid=kb;en-us;275561
Description of the new features that are included in Microsoft Jet 4.0
http://office.microsoft.com/en-us/assistance/HP010322141033.aspx
Assistance Access 2003: CONSTRAINT Clause
However, I have so far been unable to create such a constraint using
either DDL (i.e. CREATE TABLE or ALTER TABLE) or ADOX. I get the same
errors as I do when using a rule I know Jet does not support (i.e. SET
DEFAULT).
This leaves me wondering whether the syntax is supported at all. My
suspicions are further raised by the fact that both of the
abovementioned articles use the same examples containing the same
syntax errors i.e.
... FOREIGN KEY (CustId) REFERENCES Customers ON ...
should be
... FOREIGN KEY (CustId) REFERENCES Customers (CustId) ON ...
and the CREATE TABLE statements are missing their closing parentheses.
(I'm thinking MS are not interested in receiving text corrections <g>.)
Possibly the syntax is only supported in the Access2003 UI but can't
test because I no longer have an Access2003 install.
Any confirmation, thoughts, etc?
Jamie.
--
UPDATE and ON DELETE rules?
I've seen it mentioned in two Microsoft documents:
http://support.microsoft.com/default.aspx?scid=kb;en-us;275561
Description of the new features that are included in Microsoft Jet 4.0
http://office.microsoft.com/en-us/assistance/HP010322141033.aspx
Assistance Access 2003: CONSTRAINT Clause
However, I have so far been unable to create such a constraint using
either DDL (i.e. CREATE TABLE or ALTER TABLE) or ADOX. I get the same
errors as I do when using a rule I know Jet does not support (i.e. SET
DEFAULT).
This leaves me wondering whether the syntax is supported at all. My
suspicions are further raised by the fact that both of the
abovementioned articles use the same examples containing the same
syntax errors i.e.
... FOREIGN KEY (CustId) REFERENCES Customers ON ...
should be
... FOREIGN KEY (CustId) REFERENCES Customers (CustId) ON ...
and the CREATE TABLE statements are missing their closing parentheses.
(I'm thinking MS are not interested in receiving text corrections <g>.)
Possibly the syntax is only supported in the Access2003 UI but can't
test because I no longer have an Access2003 install.
Any confirmation, thoughts, etc?
Jamie.
--