Page 1 of 1

How can I do refresh or refetch only one record to browse grid?

Posted: Tue 03 Jun 2008 13:55
by developeradmin
How to refresh or refetch only one record to browse grid?
(the record may be deleted, updated or appended)
Best Regards

Posted: Wed 04 Jun 2008 08:32
by Antaeus
You can refresh the current record using the RefreshRecord method. This method lets retrieving values of the current record or remove it from dataset if it was remove at the server. If the record was deleted, you will get an exception which can be suppressed by setting Options.StrictUpdate to False. For more information see descriptions of the SQLRefresh property and the RefreshQuick method in the SDAC help.

Re: How can I do refresh or refetch only one record to browse grid?

Posted: Wed 12 Feb 2014 14:19
by mariusz
Hi there... I'd like refresh a bit this topic...

I have Query with some set of records. For various reasons, I must to add new record to database from the side (not using this query insert/append). I'm looking for fastest and causing the smallest network traffic way to fetch that one inserted / appended record and append it to dataset.

Do you have any idea / way to do that?

(in fact I need it in PGDac component, but I think that question can be more general, because it could be quite useful also with other DAC components.

regards
M.

Re: How can I do refresh or refetch only one record to browse grid?

Posted: Wed 12 Feb 2014 16:32
by AlexP
This capability depends on the server. Please specify the DB you are working with.

Re: How can I do refresh or refetch only one record to browse grid?

Posted: Thu 13 Feb 2014 23:45
by mariusz
Well... I/we work with number of different servers... SQL server 2008, Postgres 9.2, Firebird 2.5... sometimes also with Oracle 9.2 and 11 and MySQL 5.5.

Re: How can I do refresh or refetch only one record to browse grid?

Posted: Fri 14 Feb 2014 12:07
by AlexP
This functionality is supported in ODAC and SDAC in the OraChangeNotification and MSChangeNotification properties respectively, and in MyDAC - in the AutoRefresh property. Implementation examples are in the demos of each product. The other databases don't support such functionality, therefore to retrieve data, you should manually call DataSet update.