I have a WebClientConnection + WebClientdataset+WebDataSource+WebDBGrid. Fields are defined at designtime.
The Click of a button executes:
procedure TForm1.TMSFNCEditButton1ButtonClick(Sender: TObject);
begin
WebClientDataSet1.Active:=false;
WebClientConnection1.Active:=false;
WebClientConnection1.URI:='https://www.nutritional-software.at/api/api.php/records/TBLLEBENSMITTEL'+
'?filter=BEZEICHNUNG,cs,'+TMSFNCEditButton1.Text;
WebClientConnection1.URI:=WebClientConnection1.URI+'&include=LEBENSMITTELCD,HERKUNFTCD,BEZEICHNUNG';
WebClientConnection1.Active:=true;
WebClientDataSet1.Active:=true;
end;
The first click on the button seems to do nothing, the second click show the error and displays the data.
ERROR
No fields found | fMessage::No fields found FJSError::Error: No fields found fHelpContext::0
at https://www.nutritional-software.at/WebCore/P03/Project1.js [89953:68]
If I remove the WebClientDataSet1.Active:=true; (I have the AutoOpendataSet = true too), the error does not occur.
What am I missing?
Thank you!
Bernd