Subject Re: TIBOQuery Question
Author stewartwarren
Hello again ..

Here's more info on the problem I posted earlier (see below). I
tried changing the query's CommitAction property from
caInvalidateCursor to caFetchAll. This allows me to insert records
into the dataset, but when I try to save to the database, and
exception is thrown. The error message is:
"EDatabase Error with message chargesqry Record not found". The
debugger stops in the procedure TIBODataset.ResyncMode. The
exception is thrown by the line "inherited Resync( Mode );".

Does anyone know what this is all about?
Thanks for any help.
Warren


--- In IBObjects@yahoogroups.com, "stewartwarren"
<stewartwarren@y...> wrote:
> Hi all:
>
> I'm converting a BDE app to IBO and attempting to do it with as
> little code re-writing as possible. I've run into what appears to
be
> a difference in how TIBOQuery works from other TDataSet based
> components I've used (TQuery, and TwwQuery).
>
> The difference is when CachedUpdates is set true. If the
underlying
> table has fields defined with a 'Not Null' constraint, I can't
insert
> multiple rows into the TIBOQuery without putting values into
the 'not
> null' fields. Previously, I've left these fields blank in the
> dataset, until just prior to calling the ApplyUpdates method. For
> example, with TIBOQuery attached to a grid via a TDataSource that
has
> AutoEdit true, the user can't enter multiple rows of data in the
grid
> unless each row has all 'not null' fields set with a value.
>
> Is there a way to make the TIBOQuery accept rows with nulls in
> required fields and defer these checks until the data is actually
> ready to be sent to the database server?
>
> Thanks
> Warren