Page 4 of 4
Re: FWH: MySql/MariaDB: RowSet object
Posted: Thu May 18, 2017 1:23 pm
by luiz53
CHANGE LINE 35 TO
Code: Select all
oRs:bOnChangePage = { || vsay := alltrim(STR(oRs:nCurrentPage))+" / "+alltrim( STR(oRs:nMaxPages)),;
oSay:refresh(),oBrw:Refresh() }
Re: FWH: MySql/MariaDB: RowSet object
Posted: Mon May 22, 2017 6:47 pm
by luiz53
MR Rao...
OLD - Don´t work key down or key UP
NEW - BUT don´t work oRs:bOnChangePage with key down or key UP
https://www.youtube.com/watch?v=DgP54iw ... e=youtu.be
Re: FWH: MySql/MariaDB: RowSet object
Posted: Tue May 23, 2017 12:28 am
by nageswaragunupudi
In your dolphin example also pressing down arrow key does not go to next page. I sent you a sample which works exactly like your sample.
Note: Personally I do not like this kind of paging.
I prefer this
http://forums.fivetechsupport.com/viewt ... on#p199916
Re: FWH: MySql/MariaDB: RowSet object
Posted: Mon Jul 09, 2018 5:51 am
by nageswaragunupudi
Dynamically changing fields, [table], [connection] of a Rowset at runtime and also change the XBrowse:
This is possible from FWH 18.05:
Code: Select all
oRs := oCn:RowSet( cSql )
// set up browse
// during runtime
//
oRs:oCn := oNewCn // Optional
oRs:ReQuery( cNewSql ) // same or different table
oRs:SetXbrColumns( oBrw )
Sample:
Code: Select all
#include "fivewin.ch"
function Main()
local oCn, oRs, oDlg, oBrw
local aSql := { "select id,first,city, salary from customer", ;
"select * from states", ;
"select * from annual" }
oCn := FW_DemoDB()
oRs := oCn:RowSet( aSql[ 1 ] )
DEFINE DIALOG oDlg SIZE 600,400 PIXEL TRUEPIXEL ;
TITLE "SWITCH TABLES/FIELDS AT RUNTIME"
@ 60, 20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE oRs AUTOCOLS CELL LINES NOBORDER
oBrw:CreateFromCode()
@ 20, 20 BTNBMP PROMPT "CUSTOMER" ;
SIZE 100,35 PIXEL OF oDlg FLAT ;
ACTION ( CursorWait(), oRs:Requery( aSql[ 1 ] ), oRs:SetXbrColumns( oBrw ) )
@ 20,140 BTNBMP PROMPT "STATES" ;
SIZE 100,35 PIXEL OF oDlg FLAT ;
ACTION ( CursorWait(), oRs:Requery( aSql[ 2 ] ), oRs:SetXbrColumns( oBrw ) )
@ 20,260 BTNBMP PROMPT "ANNUAL" ;
SIZE 100,35 PIXEL OF oDlg FLAT ;
ACTION ( CursorWait(), oRs:Requery( aSql[ 3 ] ), oRs:SetXbrColumns( oBrw ) )
ACTIVATE DIALOG oDlg CENTERED
oCn:Close()
return nil
![Image](https://imageshack.com/a/img924/4439/rkFULk.gif)