Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

WebDBGrid and non XDATA connection

 Post Reply Post Reply
Author
Gomezel Dino View Drop Down
New Member
New Member
Avatar

Joined: 02 Dec 2010
Posts: 16
Post Options Post Options   Quote Gomezel Dino Quote  Post ReplyReply Direct Link To This Post Topic: WebDBGrid and non XDATA connection
    Posted: 26 Aug 2018 at 11:50am
I have the following setup,

  WebClientConnection1.Active := False;
  WebClientConnection1.URI:='http://192.168.0.13:3000/Viewchannelsstat';
  WebClientConnection1.DataNode:='';
  WebClientDataSet1.FieldDefs.Clear;
  WebClientDataSet1.FieldDefs.Add('Count',ftString,10);
  WebClientDataSet1.FieldDefs.Add('status',ftstring,50);
  WebClientConnection1.Active := true;
  WebClientDataSet1.Open;

The server provides this simple response:
[
   {
      "status" : "Failed channels",
      "count" : 0
   },
   {
      "count" : 0,
      "status" : "Warned channels"
   },
   {
      "count" : 89,
      "status" : "Active channels"
   },
   {
      "count" : 89,
      "status" : "Total channels"
   }
]

The error is:
TypeError: td.firstChild is null | this.SetRowHeights@http://localhost:8000/xctv/xctv.js:32650:17 this.RowCountChanged@http://localhost:8000/xctv/xctv.js:33795:33 this.SetRowCount@http://localhost:8000/xctv/xctv.js:32428:9 this.ActiveChange@http://localhost:8000/xctv/xctv.js:39409:9 cb@http://localhost:8000/xctv/xctv.js:210:16 this.ActiveChanged@http://localhost:8000/xctv/xctv.js:37561:41 this.CheckActiveAndEditing@http://localhost:8000/xctv/xctv.js:30948:9 this.DataEvent@http://localhost:8000/xctv/xctv.js:31012:9 this.DistributeEvent@http://localhost:8000/xctv/xctv.js:31264:37 this.ProcessEvent@http://localhost:8000/xctv/xctv.js:31288:7 this.DataEvent@http://localhost:8000/xctv/xctv.js:29743:11 this.SetState@http://localhost:8000/xctv/xctv.js:30209:9 this.OpenCursorcomplete@http://localhost:8000/xctv/xctv.js:30042:11 this.SetActive@http://localhost:8000/xctv/xctv.js:30070:63 this.SetActive@http://localhost:8000/xctv/xctv.js:32341:7 ---------------------
Seeems like WebClient connection cannot handle when datanode is not defined.
  WebClientConnection1.DataNode:='';

Please advise how to solve it, as I cannot Modify the server.

Back to Top
Dino Gomezel View Drop Down
Member
Member
Avatar

Joined: 27 Aug 2018
Posts: 88
Post Options Post Options   Quote Dino Gomezel Quote  Post ReplyReply Direct Link To This Post Posted: 27 Aug 2018 at 7:45am
Have found the problems relies how to serve JSON,
After changing the server the connection went OK.

In my case this project saved my back:


Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8373
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 27 Aug 2018 at 7:40pm
Thanks for informing a solution was found
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down