kyan wrote: > Due to its implementation of foreign keys and their deferring, SQLite does > not provide any useful information when a foreign key is violated; it gives > a not very helpful "Foreign key constraint failed" message instead. This is > a problem because an application developer cannot produce a proper message > to a user when a FK is violated, for instance "You cannot delete X because > it is connected to Ys" because they don't know and can't somehow deduce X > and Y.
Foreign key checks are not intended to prevent user errors but to prevent programming errors. In other words, your program is responsible for preventing the user from trying to delete some X that is still referenced by some Y (by doing a check before deleting, or, preferrably, by structuring the UI so that deleting such a X is not possible). Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users