Response from THTTPRequest to TWebClientDataSet

Hi,

I want to assign a AResponse to a TWebClientDataSet.

In the form i am a TWebClientDataSet with this properties:
Active:=False; --> I try with true too.
Connection:='';
Name:=dsUM;

And a TWebDataSource with this properties:
DataSet:=dsUM;
Name:=srUM;

Then in a OnResponse event of one TWebHttpRequest i have this code:

procedure TfMproducto.httpUMResponse(Sender: TObject; AResponse: string);
var
jsArray:TJSArray;
begin
jsArray := TJSArray(TJSJSON.parseObject(AResponse));
dsUM.Rows:=jsArray;
dsUM.Open;
console.log(dsUM.Rows); // I can see the json in the browser console...
end;

Then in the form i have a TWebDBGrid with the property DataSource:=srUM

With the debug i can see that console.log print a correct json data but in twebdbgrid not receive any data ?

What i do wrong?

Thanks

Were fields configured for the dataset?

Hi Bruno,

I solve it with information that you send me in the other thread...

I add fields in the TWebClientDataSet and it works fine.

Thanks

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.