Hi,
Now that i am working with Servoy for a while, i have the following question :
In many cases i need to retreive column data from another table.
I can retreive this data by either using a query or by using a foundset.
And of course there is the way of using relations, but i like to know the difference between the query and the foundset method
By foundset i mean :
//create foundset
var _vSet = databaseManager.getFoundSet(forms.bvko_navVerkooporderkaartenPrimStatusdetail_sub.controller.getServerName(),'bedrijven');
//load record by ID
_vSet.loadRecords(databaseManager.convertToDataSet(bedr_bedr_id));
//retreive record
var _vRecord = _vSet.getRecord(1);
verkok_kl_naam = _vRecord.bedr_naam
by query I mean :
var query = 'select bedr_naam from bedrijven where bedr_bedr_id= ?';
var args = new Array();
args[0] = bedr_bedr_id;
var dataset = databaseManager.getDataSetByQuery(forms.bcrm_navAfdelingenPrim_dtl.controller.getServerName(), query, args, -1);
verkok_kl_naam = dataset.getValue(1,1);
What is the best way to do this ( from a programming - and/or a performance point of view)
Regards,