I believe I recall that a
NOT NULL created
TABLE is not involved by a non save data in it.
In an Import Data from XML Method, I get a Nil when my data field is empty. So, I added a Nil checking. Then, I continue to get this error at the first empty field.
The first code had no Nil test and I get an error (because of a Nil).
The second code was a simple
The third code is as below because when the If line is Nil, I HAVE to store something in Target_Record (who is a DataBaseRecord).
If XML_Record_Row_Node.Child(1).Child(0) <> Nil Then
Target_Record.Column("Nom") = XML_Record_Row_Node.Child(1).Child(0).Value
Else // Else added to avoid the NOT NULL Constraint failed reported error
Target_Record.Column("Nom") = ""
Did I recall correctly or did the persons advice was not 100% true.
Nota: Usually, I used this kind of code to populate a Record
db.SQLExecute ("INSERT INTO Employees (Name,Job,YearJoined) VALUES "_
Code extract comes from the LR (SQLiteDatabase) last code example (page bottom).