You are not logged in.
Pages: 1
I would like to fill a DataSet with a JSON
I'm trying like this but I'm not getting it.
someone help me?
TB_MANAGER := TDataSet.Create(nil);
TB_MANAGER := JSONToDataSet(self, '{"ID":"00001","NAME":"MANAGER E CIA LTDA"}');
TB_MANAGER.Open;
DS_MANAGER := TDataSource.Create(nil);
DS_MANAGER.DataSet := TB_MANAGER;
DBGridManager.DataSource := DS_MANAGER;
thanks !!
Offline
1. your first TB_MANAGER := TDataSet.Create(nil) will leak memory since you are re-assigning TB_MANAGER := JSONToDataSet()
2. Open is not mandatory AFAIR
3. See sample https://github.com/synopse/mORMot/blob/ … CLUnit.pas
4. See duplicate of your own post at http://synopse.info/forum/viewtopic.php … 098#p15098
Offline
Pages: 1