Posts

Showing posts with the label delphi

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...