Refreshing underlying data

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ibdac2pro
Posts: 17
Joined: Mon 15 Oct 2007 14:26
Location: UK

Refreshing underlying data

Post by ibdac2pro » Mon 15 Oct 2007 14:31

Hi,

I have an application written in Delphi 7 with an Interbase 7 database.

The application runs in a multi-user environment and I was wondering what is the most efficient way to refresh my view of the data in order to reflect changes made by other users.

Many thanks,

Michael

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 17 Oct 2007 08:04

Call the Refresh method of TIBCQuery to refresh the data. You can call this method when a user presses some button or selects an item from the program menu. You can also use TTimer component to call the Refresh method periodically.

ibdac2pro
Posts: 17
Joined: Mon 15 Oct 2007 14:26
Location: UK

Refreshing underlying data

Post by ibdac2pro » Fri 19 Oct 2007 13:07

Hi
Thank you for your quick response.
Unfortunately I have used Refresh several times to obtain the underlying data but the values from computed fields do not appear on the application.
I have even tried opening and closing the query, to no avail. The data from these computed fields does eventually appear if I move onto another record and back.
Additional information
I am using a masterdetail relationship with the computed data on the detail.
I have also tried IBCQuery1.params.

Many thanks

Michael

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 22 Oct 2007 11:04

We could not reproduce the problem. Please specify, do you mean computed fields in the database table, or Delphi calculated fields?

ibdac2pro
Posts: 17
Joined: Mon 15 Oct 2007 14:26
Location: UK

Refreshing underlying data

Post by ibdac2pro » Mon 22 Oct 2007 12:21

Thanks for your prompt reply.

The computed fields are actually in the database.

For example :

TOTALK121 COMPUTED BY (oneofftotalK120+materialtotalK118+
fabcostsK117+lasercostK119),
COSTTOMAKE COMPUTED BY ((totalK121*100)/(100+Markup)),
MARKUPIN COMPUTED BY (totalK121-Costtomake)

Hope this helps.

Many thanks,

Michael

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 23 Oct 2007 08:12

Please send to ibdac*crlab*com a complete small sample that demonstrates the problem, including script to create server objects.

Post Reply