Quantcast
Channel: FiveTech Software tech support forums
Viewing all articles
Browse latest Browse all 26212

FWH: MySql/MariaDB: RowSet object

$
0
0
[size=150:11e025h4][b:11e025h4]ReQuery( [params] ), Refresh() and ReSync()[/b:11e025h4][/size:11e025h4] [b:11e025h4]ReQuery()[/b:11e025h4] Reads the entire rowset again from the Server using the original SQL and replaces the previous data with new data. This method works exactly like ADO's Requery. [b:11e025h4]ReQuery( params )[/b:11e025h4] In case the RowSet was originally created using parameterised query as explained above, we can use different parameters and read different results. New results replace the present data. [b:11e025h4]Refresh()[/b:11e025h4] This method reads from the server only the modifications and insertions made after first read or previous Refresh() and updates the RowSet. Even on very large data this is very fast and definitely far better than ReQuery() to update the RowSet to sync with other net work users' changes. Conditions for usage: (a) The rowset should have a primary key or unique key and (b) also a timestamp field that is updated with every modificaton. This field can be created at the time of creation of table by using "=" as field type. Example: [code=fw:11e025h4][/code:11e025h4] [i:11e025h4]Limitations: Refresh() can not get data about records deleted by other users. We need different approach for that.[/i:11e025h4] [b:11e025h4]ReSync()[/b:11e025h4] Reads from the server data of the current record only and refreshes data of current record. Works if the rowset contains primary/unique key or all other values together can uniquely identify a record on the server. In case of simple to complex sql statements with multiple tables also, as long as the rowset object is able to detect the main table, Refresh() and Resync() work. Resync() is the most used function internally. After every save, the saved record is Resynced. [b:11e025h4][i:11e025h4]Requery( params ), Refresh() and Resync() are unique to RowSet.[/i:11e025h4][/b:11e025h4]

Viewing all articles
Browse latest Browse all 26212

Trending Articles