I have a Web Core application that was working with 1.2. My current version is 1.3.0.1.
The application contains a WebClientConnection, WebClientDataSet, WebDataSource, and a WebDBGrid. The grid is connected to the datasource. The datasource is connected to the client. The client is connected to the connection.
The server is running and returns data. "Fetch Fields" in the Client Data Set returns the field names.
This is the only code which is listed in the forms OnShow event.
procedure TwmSchoolList.WebFormShow(Sender: TObject);
begin
WebClientConnection1.Active := True;
WebClientDataSet1.Open;
ShowMessage('Records='+IntToStr(WebCLientDataSet1.RecordCount));
end;
The message shown is "Records=0". The server has CORS and is not using JWT. Double clicking GetSchoolsBatch in the debugger opens a new browser window showing all the data.
Additional information is shown below. The only change I am aware of is I have updated to 1.3. What do I need to do to get this working again?
Here is an excerpt from what is returned:
[{"OBJECTID":140478,"FAC_TYPE":"School","L_FAC_TYPE":"Elementary school","NAME":"Three Oaks Elementary School","ADDRESS":"19600 Cypress View Dr","CITY":"Fort Myers","ZIP":33967,"STRAP":"2246250001001101A","MISC1":"1 stories","MISC2":"809 students","PHONE":2392678020,"SOURCE":"Lee County School Board (2013)","X":-81.7956764702672,"Y":26.4550673404218,"USNG":"17R MK 20678 26326","EDITOR_NAME":"LEE-COUNTY-FL\\hoytal","EDIT_DATE":"20130221T000000","SCHOOLZONE":"South","YEARBUILT":1988,"STORIES":1,"STUDENTS":809,"YEARESTABLISHED":1988},{"OBJECTID":140479,"FAC_TYPE":"School","L_FAC_TYPE":"Elementary school","NAME":"Bonita Springs Elementary School","ADDRESS":"10701 Dean St","CITY":"Bonita Springs","ZIP":34135,"STRAP":"354725B3003540010","MISC1":"1 stories","MISC2":"419 students","PHONE":2399920801,"SOURCE":"Lee County School Board
Debugger Network Result:
-
Request URL:http://localhost:2001/tms/xdata/indigoservice/getschoolsbatch
-
Request Method:GET
-
Status Code:200 OK
-
Remote Address:[::1]:2001
-
Referrer Policy:no-referrer-when-downgrade
- Response Headersview source
-
access-control-allow-origin:*
-
Content-Length:59534
-
Date:Tue, 10 Dec 2019 14:43:42 GMT
-
Server:Microsoft-HTTPAPI/2.0
- Request Headersview source
-
Accept:*/*
-
Accept-Encoding:gzip, deflate, br
-
Accept-Language:en-US,en;q=0.9
-
Connection:keep-alive
-
Host:localhost:2001
-
Origin:http://localhost:8000
-
Referer:http://localhost:8000/XDataWebClientProject1/MainMenu.html
-
Sec-Fetch-Mode:cors
-
Sec-Fetch-Site:same-site
-
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36