Other jSQL: Foreign key constraint failed: How to get causing column?

KMatle

Expert
Licensed User
Longtime User
In a table I've got 2 columns with a foreign key and for a test I tried to change one to a not valid value. The result (as expected)

B4X:
java.sql.SQLException: [SQLITE_CONSTRAINT]  Abort due to constraint violation (foreign key constraint failed)
    ..... (nothing to see here)

The exception doesn't tell which column is causing it. Does anyone know how to get it? (I searched the www but did not find a solution)
 

OliverA

Expert
Licensed User
Longtime User
You may be out of luck, since all examples given in SQLite's documentation on foreign key constraints (https://sqlite.org/foreignkeys.html) show just the "foreign key constraint failed" message without specifying what exactly caused it, what tables/columns are involved.
 
Upvote 0
Top