Gut, ich komme noch dazu... bin noch am Post #2
Habe das Problem so gelöst, aber die FK werden trotzdem gelöscht. Ich verstehe nicht wieso, ist doch alles richtig gemacht, zumindest beim
DB Erstellen.
Delphi-Quellcode:
PRAGMA foreign_keys = ON;
CREATE TABLE [tbmain] (
[id_tbmain] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
[title] TEXT NOT NULL,
[start] DATETIME NOT NULL,
[ende] DATETIME,
[memo] TEXT,
[flag] INTEGER NOT NULL,
[fk_category_id] INTEGER,
[fk_processowner_id] INTEGER,
[fk_priority_id] INTEGER,
[fk_status_id] INTEGER NOT NULL,
[fk_place_id] INTEGER,
FOREIGN KEY ([fk_category_id]) REFERENCES [tbcategory]([id_tbcategory]) ON DELETE RESTRICT,
FOREIGN KEY ([fk_processowner_id]) REFERENCES [tbprocessowner]([id_tbprocessowner]) ON DELETE RESTRICT,
FOREIGN KEY ([fk_priority_id]) REFERENCES [tbpriority]([id_tbpriority]) ON DELETE RESTRICT,
FOREIGN KEY ([fk_status_id]) REFERENCES [tbstatus]([id_tbstatus]) ON DELETE RESTRICT,
FOREIGN KEY ([fk_place_id]) REFERENCES [tbplace]([id_tbplace]) ON DELETE RESTRICT)