|Title:||Error is PK Segment may not be NULL, actual error is PK Duplicate|
|Last Modified:||2013-11-15 08:45:37|
|Version Found In:||System.Data.SQLite.184.108.40.206|
anonymous added on 2013-11-14 11:46:21:
DB is standard "northwind.db", table "orderDetails". Development system is Microsoft Visual Studio 2010 (Visual Basic) using Microsoft DataGridView. Copy and paste last row with NULL ROWID. Call tableAdapter.update(DataGridview). Catch E as SQLite.SQLiteException SQLite error is: "Constraint failed, OrderDetails. OrderID may not be NULL." Actual error should be: "Constraint failed, Primary Key segments must be unique." (or something to that effect). Took me a while to find the actual error because I was trying to determine why MS was using the 'ROWID' for the 'OrderID' (which of course it was not ... but it was the only NULL in the data record). Yes, I am aware that I should not be trying to save a record with duplicate PK segments. I am testing my application to see if it have handles common errors.
anonymous added on 2013-11-14 11:49:27:
SQLite Error code is 19.
mistachkin added on 2013-11-15 08:45:37:
The format of these error messages are not documented and are subject to change.