Sorry, this is the correction. We can not have blank where clause
oRs := oCn:RowSet( "SELECT * FROM country ? ORDER BY CODIGO", { "WHERE 1=1" } )
should return full table
oRs:REQUERY( { "WHERE NAME LIKE '%AL%'" } ) // the param should be an array
shows where the where condition is true
This also works:
cSql := "select * from states ? ?"
oRs := oCn:RowSet( cSql, { "WHERE name like '%n%'", "ORDER BY code" } )
xbrowser oRs
oRs:Requery( { "WHERE name like '%y%'", "ORDER BY name" } )
xbrowser ors
But, unless the tables are very large, we recommend using oRs:Filter() and oRs:SetOrder() instead of reading again and again from the server with different where and order by clauses for every change
This reduces burden on network traffic and server.
↧