How to refresh or refetch only one record to browse grid?
(the record may be deleted, updated or appended)
Best Regards
How can I do refresh or refetch only one record to browse grid?
-
- Posts: 11
- Joined: Tue 25 Mar 2008 09:55
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?
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.
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?
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?
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?
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.