MS Access 97 referential integrity - TechRepublic
General discussion
July 27, 2000 at 12:33 AM
avhohlov

MS Access 97 referential integrity

by avhohlov . Updated 25 years, 10 months ago

This is repeating of my last question.
I need to use complex foreign key, some
fields of this is not required. Simplified
example showed below (in real database values of required fields defines by another foreign key and ckeck)

CREATE TABLE A
(F1 TEXT(3) NOT NULL,
F2 TEXT(3) NOT NULL,
INFO TEXT(32) NOT NULL,
CONSTRAINT PK PRIMARY KEY (F1,F2));

CREATE TABLE B
(F1 TEXT(3) NOT NULL,
F2 TEXT(3) NULL,
INFO TEXT(32) NULL,
CONSTRAINT FK FOREIGN KEY (F1,F2) REFERENCES A(F1,F2));

In MS Access 97 I can’t insert into table B
values (‘001′,NULL,’INFO’) – error 3201 generated. In MS Access 2.0 such insert is
allowed. In ORACLE DBMS this code also work correctly. Can I tune MS Access 97 to allow this input (last recommendation to allow NULL in A.F2 is not work) – Thank you.

This discussion is locked

All Comments