Page 1 of 1

How to check new records on refresh method

Posted: 25.01.2010, 10:06
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 ?

Posted: 25.01.2010, 23:59
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