datasnap

Delphi: Accessing JSON Objects within a JSON Array

◇◆丶佛笑我妖孽 提交于 2019-12-30 04:38:18
问题 I have a JSON Object, let's name it jObject that looks like this: { "id": 0, "data": "[{DAT_INCL: \"08/03/2012 10:07:08\", NUM_ORDE: 1, NUM_ATND: 1, NUM_ACAO: 2, NUM_RESU: 3}, {DAT_INCL: \"08/03/2012 10:07:09\", NUM_ORDE: 2, NUM_ATND: 1, NUM_ACAO: 4, NUM_RESU: 5}, {DAT_INCL: \"08/03/2012 10:07:09\", NUM_ORDE: 3, NUM_ATND: 1, NUM_ACAO: 8, NUM_RESU: NULL}]" } As you can see, it contains two pairs, one of which is an array with three objects in this case (the amount of objects is dynamic) with

Delphi DBExpress Parent Child No corresponding master record found

£可爱£侵袭症+ 提交于 2019-12-25 05:14:51
问题 I am using DBExpress to connect to MySQL. I have a master detail relationship between two tables. I am providing the parent table via DatasetProvider. On the client side I have 2 clientdatasets. One of them accesses the provider, has all the parent field + the nested dataset field of the child. The second clientdataset Dataset field property is set to the nested dataset field of the parent. Now when I add a new record in the child dataset, it gives me an error "No corresponding master record

DataSnap return empty dataset

大城市里の小女人 提交于 2019-12-24 13:20:11
问题 After more than a week's trial, I feel very depressed with DataSnap. Today I again encountered a problem, My Android(Java) client need to get a dataset from the DataSnap Server(XE6),but the server return a empty result: {"result":[{"table":[]}]} Here is the server code: function TServerMethods1.GetDataset(cmdstr: string): TDBXReader; var CMD: TDBXCommand; begin SQLConnection1.Open; CMD := SQLConnection1.DBXConnection.CreateCommand; CMD.CommandType := TDBXCommandTypes.DbxSQL; CMD.Text :=

Streaming TClientDataSet using Datasnap in Delphi XE6

元气小坏坏 提交于 2019-12-24 01:22:15
问题 I am trying to stream a TClientDataSet using Datasnap in Delphi XE6. However, I keep getting a "Missing Data Provider or Data Packet" error on the client side code. //Client procedure TForm2.Button1Click(Sender: TObject); var CDS: TClientDataSet; S: TStream; begin CDS := TClientDataSet.Create(nil); try S:= ClientModule1.ServerMethods1Client.getCDSData; S.Seek(0,soFromBeginning); S.Position:= 0; CDS.LoadFromStream(S); CDS.Open; // Missing Data Provider or Data Packet finally CDS.Free; end; end

DataSnap standalone HTTPS server (EXE) - OpenSSL support for TLS v1.2

五迷三道 提交于 2019-12-21 23:37:21
问题 I have a standalone (EXE) DataSnap server written in Delphi XE6 which I've secured with an SSL certificate using the OpenSSL DLLs. When I test the connection to the server I can see that it supports TLS v1.0. I now need to ensure the server can support TLS v1.2 (e.g. to support connections from iOS9 apps). However I can't see how to enable this. I've made the Windows registry changes to the (Windows 2008R2) server to enable TLS v1.2 but I guess this only affects IIS apps. Can anybody show me

TClientDataSet Doesn't Release Memory

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 22:37:26
问题 I have a DataSnap server that creates a TSQLQuery, TDataSetProvider and a TClientDataSet that are unique to a given user's session, which are used and reused to retrieve data from a database and send TClientDataSet.Data (an OleVariant) to the client. It works very well, except for one problem. When I populate the TClientDataSet by calling its Open method, the memory that is allocated is not freed until the user disconnects their client from the DataSnap server. As the user uses the

Midas.dll error loading midas.dll

泪湿孤枕 提交于 2019-12-18 08:24:54
问题 I have a problem when I try my app on an other computer without Delphi. If I put midas.dll in the same folder / directory on System32 I always get error message Error loading midas.dll , but if I put midas.dll on the desktop then the error message does not appear and the application runs normally. How to handle midas.dll so I can place it in the same folder? 回答1: From the command line type: regsvr32 filepath\midas.dll You should specify a full path (if another copy of midas.dll exists in the

file_get_contents returns empty string in shared host

心已入冬 提交于 2019-12-13 20:04:01
问题 I'm trying get url contents with file_get_contents(), its works in my localhost server, but in shared host server, the function returns a empty string, without errors . My code follows: $uri = 'http://my_url.com:81/datasnap/rest/TServerMethods/getLoginCliente/galf/123/'; $result = file_get_contents($uri); var_dump($result); and the result is: string(0) "" instead of: {result: [4532,1]} I'm test change the url for google.com, and works perfectly. Anyone know why this happens? 回答1: Check if

Add a Custom Header on a TISAPIRequest (Delphi 10.1 Datasnap Server)

感情迁移 提交于 2019-12-13 17:13:17
问题 Do you know how to manually add a custom header on a TISAPIRequest ?. This class (or the most generic TWebRequest) doesn't expose a RawHeaders property to allow adding new customized Headers when needed. PS: I have a dirty solution for when my WebRequest is a TIdHTTPAppRequest (Datasnap standalone server), because then I can create a Helper Class to access to its private FRequestInfo property, and from there gain access to a RawHeaders, which I can use to add a new header. But I only use

how to return TByteDynArray in SqlServerMethod DataSnap Server

我的未来我决定 提交于 2019-12-13 08:26:05
问题 I have a DataSnap Server with a Server method like this: function TServerMethods1.Get_Excel_History(key: string): TByteDynArray; Now, on the DataSnap Client using TSQLServerMethod, I successfully connect to the server in Design Mode, and I'm sending the request to Server and successfully receiver the data but can not read the output parameter. M.SqlServerMethod1.Close; M.ClientDataSet_All.Close; M.SqlServerMethod1.ServerMethodName:='TServerMethods1.Get_XML_History'; M.SqlServerMethod1.Params