Thanks ChrisW67 for reply.
I'm sorry for my English, maybe that is why we did not understand.
I do not need to delete primary key, but foreign keys ( FK in table driver, as the driver can be free of car ).
Definitions of table "DRIVER" : CREATE TABLE "driver" ("ID" INTEGER PRIMARY KEY NOT NULL , "NAME" TEXT, "CAR" INTEGER)
where column "CAR" contain foreign key from table "CARS".
LastError() does not contain any errors.
I have to allow the driver to remove car, so delete the primary key, so delete relationship.
If create a new entry in table driver, does not fill a column CAR, write by
" rtblmdl->setRecord(ui->tblW->currentIndex().row(),rec);
rtblmdl->submitAll();"
ended without error, and column CAR containing NULL.
If create a new entry in table driver, with fill a column CAR (FK from table CARS), without error. But if i need delete this FK, write by
" rtblmdl->setRecord(ui->tblW->currentIndex().row(),rec);
rtblmdl->submitAll();"
ended without error, but FK don't delete.
Milos.




Reply With Quote

Bookmarks