Board index » delphi » live query problem

live query problem

I am querying a table to produce a list of jobs for a given date.
The query selects data from three tables. The result is viewed on a
dbCtrlGrid one of the fields displayed is veh no. I want to be able
to select this and change it passing the change back to the
underlying table. I am unable to do this.

I have tried using update object to no avail I have request live
set to true however I am using paradox tables.

Can anyone advise me what to do here? Do I need a different
component?

Any advice gratefully received

David {*word*82}

 

Re:live query problem


On Tue, 21 Dec 1999 22:20:20 -0000, "David Butt" <david.b...@lineone.net>
wrote:

Quote
>I am querying a table to produce a list of jobs for a given date.
>The query selects data from three tables. The result is viewed on a
>dbCtrlGrid one of the fields displayed is veh no. I want to be able
>to select this and change it passing the change back to the
>underlying table. I am unable to do this.

>I have tried using update object to no avail I have request live
>set to true however I am using paradox tables.

>Can anyone advise me what to do here? Do I need a different
>component?

Use of a TUpdateSQL component is only effective if cached updates are
enabled for the query result set. Have you done this? How many of the
query's tables are to be updated? One TUpdateSQL is needed for each and the
updating SQL in any one TUpdateSQL can only apply to one target base table.
And just how were you trying to use an update object?

Setting the RequestLive property of the TQuery is correct and appropriate,
both for Paradox tables and other. The key is that it be done in
conjunction with enabling cached updates and providing a mechanism for
applying the updates from that cache.

Have you read the Database Developer's Guide chapter on cached updates? In
the online help's table of contents, navigate to the topic title:

  Developing Database Applications
    Working with cached updates

What version of Delphi are you using? The above chapter was updated some
with Delphi 4.

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Steve Koterski              "Health nuts are going to feel stupid someday,
Felton, CA                  lying in hospitals dying of nothing."
                                                              -- Redd Foxx

Re:live query problem


Quote
Steve Koterski <koter...@NOSPAMgte.net> wrote in message

news:386812af.30206785@news.gte.net...

Quote
> On Tue, 21 Dec 1999 22:20:20 -0000, "David Butt" <david.b...@lineone.net>
> wrote:

> >I am querying a table to produce a list of jobs for a given date.
> >The query selects data from three tables. The result is viewed on a
> >dbCtrlGrid one of the fields displayed is veh no. I want to be able
> >to select this and change it passing the change back to the
> >underlying table. I am unable to do this.

> >I have tried using update object to no avail I have request live
> >set to true however I am using paradox tables.

> >Can anyone advise me what to do here? Do I need a different
> >component?

> Use of a TUpdateSQL component is only effective if cached updates are
> enabled for the query result set. Have you done this? How many of the
> query's tables are to be updated? One TUpdateSQL is needed for each and
the
> updating SQL in any one TUpdateSQL can only apply to one target base
table.
> And just how were you trying to use an update object?

I followed the instructions for updating a read only result set in the
developers guide by adding a TUpdateSQL component to the data module set the
datasets UpdateObject to the name of the
UpdateSql component. Entered a ModifySql statement set the datasets
cachedupdates to true

Only one of the queries tables is to be updated.

Quote

> Setting the RequestLive property of the TQuery is correct and appropriate,
> both for Paradox tables and other. The key is that it be done in
> conjunction with enabling cached updates and providing a mechanism for
> applying the updates from that cache.

I have tried setting an onUpdateRecord for the dataset as follows
DiaryQry.Apply(UpdateKind)

Quote
> Have you read the Database Developer's Guide chapter on cached updates? In
> the online help's table of contents, navigate to the topic title:

>   Developing Database Applications
>     Working with cached updates

> What version of Delphi are you using? The above chapter was updated some
> with Delphi 4.

I am working with Delphi Pro3

Other Threads