Subject Re: [IBO] TBlobField in IBOQuery with CachedUpdates=True
Author Helen Borrie
At 12:55 PM 27/09/2007, you wrote:
>--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
> >
> > At 12:01 AM 27/09/2007, Earnest wrote:
> > >Hello,
> > >
> > >I have a problem with IBOQuery's CachedUpdates.
> > >
> > >I found that when IBOQuery's CachedUpdates is set to true, the Blob
> > >field will be emptied if I try to insert a new record.
> >
> > Could you explain what you mean by "emptied"? A blob field on a
>new
> > record will be null...
>
>Sorry for my poor English.

The English is fine - the facts are deficient. :-)


>When I try to insert a new record, the value of BLOB field of last
>record will be deleted. There is value of BLOB field in last record
>only.
>
>If I insert one record only and post it by calling ApplyUpdates &
>CommitUpdates before to insert a new record. This record's BLOB value
>will be saved. If I try to insert the second record, the BLOB field
>value of first record will be null.
>
> > >If I set CachedUpdates to false, everything is OK.
> >
> > What is "OK"? Are you talking about editing in a DBGrid?
>
>Yes, I edit records in wwDBGrid (InfoPower's DBGrid), but I call
>another form to edit the value of BLOB field.
>
>If I set CachedUpdates to false, all records' BLOB value will be
>saved.
>

OK, more questions...

What versions of

1. IBO?
2. Delphi?
3. Infopower?

The change of dataset state from dsEdit to dsInsert, or making a new
call to Insert, is meant to post the outstanding changes *to the
dataset*. When CachedUpdates is true, this Post operation does not
post the changes to the database, but updates the cache buffer. Only
ApplyUpdates posts the cached changes from the cache buffer to the database.

I wonder whether your workflow for catching the contents of your
BLOB-editing form actually works with cached updates.

4. Could you please show how you update the BLOB field from this form?

Helen