Posts

Showing posts with the label delphi-10.2-tokyo

Passing a JSON object to Datasnap Server application

Image
Clash Royale CLAN TAG #URR8PPP Passing a JSON object to Datasnap Server application I have a datasnap application server and a client witten in Delphi Tokyo 10.2. I need to know whether I do the communication between the two correctly. I will write down the client code here : Client Code: procedure TRemoteAcessModule.InitialiseRESTComponents(BaseURL: string); var ReqParam : TRESTRequestParameter; begin //URL to which client has to connect RESTClient1.BaseURL := BaseURL;//'http://192.168.110.160:8080/datasnap/rest/TserverMethods1'; RESTClient1.Accept:= 'application/json, text/plain; q=0.9, text/html;q=0.8,'; RESTClient1.AcceptCharset := 'UTF-8, *;q=0.8'; RESTRequest1.Client := RESTClient1; RESTRequest1.Response := RESTResponse1; RESTResponse1.RootElement := 'Rows'; RESTResponseDataSetAdapter1.Response := RESTResponse1; RESTResponseDataSetAdapter1.Dataset := FDMemTable1; RESTResponseDataSetAdapter1.NestedElements := true; end; class function TIt...

TFDTable edit fails with Firebird 2.5.7 not 2.5.3

Image
Clash Royale CLAN TAG #URR8PPP TFDTable edit fails with Firebird 2.5.7 not 2.5.3 This code: FDConnection.Open; // Design time TFDConnection; default settings TabelGrid.Close; // TDFTable connected to TFDConnection; default settings TabelGrid.TableName := 'TT_ACT'; TabelGrid.Open; TabelGrid.Edit; TabelGrid.FieldByName('TT_NAME').AsString := TabelGrid.FieldByName('TT_NAME').AsString + '*'; TabelGrid.Post; fails with [FireDAC][Phys][IB]-312 Exact update affected [0] rows, while [1] was requested when Firebird 2.5.7 is installed, not when Firebird 2.5.3 is installed. Call stack: Conditions: TFDConnection sysdba TFDPhysIBDriverLink TFDPhysFBDriverLink The table has 3 indices: TT_I0_ACT TT_ACT_ID Primary TT_I1_ACT TT_PARENT_ID TT_I2_ACT TT_FROMDATE I've fumbled with settings, especially changing the default UpdateOptions.UpdateMode s from UpWhereKeyOnly to UpWhereChang...

How to return more than 50 results from Dynamics 365 using the Web API

Image
Clash Royale CLAN TAG #URR8PPP How to return more than 50 results from Dynamics 365 using the Web API Continuing on with my Dynamics 365 from Delphi project, I am now at a point where I need to be retrieving more data from CRM than the 50 entities I can get by default, and that by setting the maxpagesize preference, I should be able to get more. This is what my existing Delphi code looks like to retrieve the data from Dynamics: RESTClient.BaseURL := 'https://mytest.api.crm6.dynamics.com'; RESTRequest.Resource := 'XRMServices/2011/OrganizationData.svc/AccountSet?$select=Name&'; RESTRequest.Accept := 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8'; RESTRequest.Execute; This returns 50 results, and follows up with the paging tag (which we will ignore for now): <link rel="next" href="https://mytest.api.crm6.dynamics.com/XRMServices/2011/OrganizationData.svc/AccountSet?$select=Name&amp;$skiptok...