Subject Re: [IBO] TIB_Query->Insert throws on non-NULL fields - FIXED
Author tickerboo2002 <support@tickerboo.com>
> It looks as if your Query is already in Insert/edit mode before
calling

Bingo - that's it!

I'd changed some code so that it was doing this (on an empty dataset):

qry->FieldByName("Notes")->AsString = "Uh-oh";
....
qry->Insert(); // Pow!

Does the first line auto insert a row? Or should it throw an
exception?

Anyhow, the correct sequence below works.

qry->Insert();
qry->FieldByName("Notes")->AsString = "Uh-oh";

That's something new I've learnt.

Thanks for everyone's suggestions.