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

FWH: MySql/MariaDB: RowSet object

$
0
0
[size=150:3f0wo8hl]Large tables (continued) [/size:3f0wo8hl] [b:3f0wo8hl]Expansion:[/b:3f0wo8hl] We have seen in the above posting, how to start with reading a few records with oRs := oCn:RowSet( , nRows ) and later keep reading more and more records with oRs:ReadNext( [nNextRows] ) and add to the original rowset. This way finally we end up with a full rowset of all rows of the large table. We can then use Sort, Filter, etc on the entire rowset, without contacting the server again. [b:3f0wo8hl]Pagination:[/b:3f0wo8hl] Some users are used to a different approach of dealing with different parts of the table separately as pages. Rowset object now supports this approach too. (Revised build of FWH 16.08). Here again we start with oRs := oCn:RowSet(
, nRows ) nRows is treated as the pagesize ( oRs:nPageStep ) After this we can use oRs:NextPage(), oRs:PrevPage(), oRs:GoToPage( n ) as required. [b:3f0wo8hl]Parameters:[/b:3f0wo8hl] It is also possible to deal with different logical parts of the table based on a range of values of different columns. Example: oRs:RowSet( "SELECT * FROM CUSTOMER WHERE `STATE` = ?", { "NY" } ) Later oRs:ReQuery( { "OH" } ) oRs:ReQuery( { "CA" } ) etc

Viewing all articles
Browse latest Browse all 26212

Trending Articles