Board index » delphi » After Insert, record go missing in DBGrid

After Insert, record go missing in DBGrid

Hi All,

After I do an Insert into a TQuery using a DBGrid and Cached updates,
the record is no longer there. Yet if I close and reopen the query, it
is there. I can replicate this using the Inprise Demo "CachedUp".

It does not make sense to me.

Regards,

Grant

 

Re:After Insert, record go missing in DBGrid


Sensible or not, that's what happens.  The thing is that you are adding to
the Table after the query has generated results, so you need to regenerate
the query to bring the new item into the grid.

Someone else can tell you and me if my preference of using a Filter rather
than a query is more efficient.  Perhaps it will depend on the number of
records involved?

Regards

Jeff

Quote
G Corry wrote:
> Hi All,

> After I do an Insert into a TQuery using a DBGrid and Cached updates,
> the record is no longer there. Yet if I close and reopen the query, it
> is there. I can replicate this using the Inprise Demo "CachedUp".

> It does not make sense to me.

> Regards,

> Grant

--
Jeff Cook

At work: Phone:+64-9-424 5388
++++++++ Mobile: +64-21-635 185
++++++++ Program Development/Client Support
++++++++ Aspect Systems Ltd
++++++++ Software for Real Estate & Human Resources
At home: Phone:  +64-9-424 0336
++++++++ Husband, Dad, Grandad
++++++++ Enthusiastic but slow triathlete
++++++++ Justice of the Peace

Re:After Insert, record go missing in DBGrid


Could you repost the demo "CachedUp" or tell me where to get it.  If you
have it maybe you could send it to mailto:pri...@piercefire.org.  TIA

G Corry <gco...@nospam.buckconsultants.com> wrote in article
<362F9CC9.A534D...@nospam.buckconsultants.com>...

Quote
> Hi All,

> After I do an Insert into a TQuery using a DBGrid and Cached updates,
> the record is no longer there. Yet if I close and reopen the query, it
> is there. I can replicate this using the Inprise Demo "CachedUp".

> It does not make sense to me.

> Regards,

> Grant

Other Threads