Local lcSQL
TEXT TO lcSQL NOSHOW
Select vesselname,vesselid
from
Vessels
where [MySearch] $
vesselname
order By 1
into Cursor curVessel NOFILTER
ENDTEXT
This._searchgrid(m.lcSQL,'curVessel.VesselName')
Where [MySearch] will be automatically replaced by xBox class with whatever you have already typed. And curvessel.VesselName is the value it will return, the one that will be held by its .Value property. There is secondary value it can return after that via .ExtraValue property but that is another topic. If you are already a subscriber or user of ssUltimate's xBox, then you already know about this.
Lately, I decided to use MariaDB and so to make xBox working there, I showed the way here: http://sandstorm36.blogspot.com/2017/04/xbox-on-mysql-backend.html
But that requires two jumps as follows:
* Get data from MariaDB/MySQL
SQLExec(gomyapp.dbHandle,'Select vesselname,vesselid from
Vessels order by vesselname','vessels')
* Use generated cursor on the
class
Local lcSQL
TEXT TO lcSQL NOSHOW
Select vesselname,vesselid
from
Vessels
where [MySearch] $
vesselname
order By 1
into Cursor curVessel NOFILTER
ENDTEXT
This._searchgrid(m.lcSQL,'curVessel.VesselName')
Or you can reverse the process limiting the number of records of the cursor generated from the other backend using WHERE clause on the SPT query instead of the one needed by xBox class.
Today, I added two new direct calls to the other backend which will not require a 2nd jump anymore. Two new class methods, 1st is for SQL Pass-Through query approach and another for Stored Procedure approach. Let us see how the call is made on those two:
via _SPT() Method. This expects parameters as follows:
Lparameters ndbHandle, cSQL,
cCursor, vValue, vExtraValue