How to check new records on refresh method

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
woolfik
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 29.06.2009, 09:37

How to check new records on refresh method

Post by woolfik »

Hello I have a database on PostgreSQL and my main application (serwer) reads some information from a remote location and save new records to one of the tables. The secont application (client) works on many diffrent computers and reads only this table from our database. In my application is a query, dataset connected to query and dbgrid connected to dataset. On dbgrid is everything ok on timer is procedure qrMonit.Refresh; (TZQuery - SQL is SELECT * FROM TABLE1) and on dbgrid records are refreshing ok but in the client application I need to play diffrent sounds on diffrent value of records.

And at this moment I have a problem. When I call a qrMonit.Refresh procedure dbgrid show all records but I dont have value of all new records. Working on Refresh it calls the DATACHANGE but doesn't change the query and i do not have the value of the new record.

How can I check new records after refreshing query ?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Your problem seems related to updated records not being committed to the database or transaction isolation level. Don't know exactly what TI-levels PG supports.
First check if Autocommit is on in the inserting appplication OR if an explicit commit is executed.
Secondly, check if the inserted records are visible from a PG admin tool.
if this doesn't work, start reading about TI-levels and PG...

Mark
Image
Post Reply