I have this tables:
#1:
CREATE TABLE [mat] (
[ID_MAT] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
[kod] TEXT,
[popis] TEXT UNIQUE,
[dilu_aktual] INTEGER,
[dilu_aktualmax] INTEGER);
#2:
CREATE TABLE [mat_spoj] (
[ID_VYROBEK] INTEGER NOT NULL REFERENCES [vyroba]([ID_VYROBA]),
[ID_MAT] INTEGER NOT NULL REFERENCES [mat]([ID_MAT]),
[dilu_max] INTEGER,
[sarze] TEXT,
[dilu_stitek] INTEGER,
[POZICE] TEXT,
[ghp_stav] INTEGER);
I use SQL Little Express Personal - when I try to delete used row in table
"mat" i get error message
Abort due to constraint violation. - Helped by command DELETE from mat WHERE
ID_MAT=3
When I try to make in my application
cmd = new SQLiteCommand("DELETE from mat WHERE ID_MAT=3",parent.conn);
cmd.ExecuteNonQuery();
=>SQL Delete this row! without any problem.
Whay? How to solve it?
Pavel
--
View this message in context:
http://old.nabble.com/C--delete-primary-key-used-in-another-table-tp33499843p33499843.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users