Subject | Re: [IBO] TIB_Query->Insert throws on non-NULL fields - FIXED |
---|---|
Author | tickerboo2002 <support@tickerboo.com> |
Post date | 2003-01-30T16:44:35Z |
> It looks as if your Query is already in Insert/edit mode beforecalling
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.