datasnap

Which midas.dll to use? 32bit datasnap/64bit server

房东的猫 提交于 2019-12-10 11:14:10
问题 Considering the following: We have a 32 bit Datasnap server installed on a 64 BIT Windows Server In embarcadero\rad studio\11.00\redist are 2 folders : 32 bit and 64 bit, with in each a midas.dll. Wich file should we put where? In windows\system32 or windows\syswow64 ? 回答1: Never put anything in the Windows system directories (unless you have a very, very, very good reason to write there). It's a very bad practice (dating back to Windows 3.x times and poor developers skills, because those

Is it possible to change the Response Code when user authorization fails in a datasnap server?

[亡魂溺海] 提交于 2019-12-09 13:17:50
问题 Is it possible to change the HTTP Response Code in my DataSnap (Delphi XE3) server when user authorization fails? Currently it's returning HTTP/1.1 500 Internal Server Error , which can happen in many other scenarios, and doesn't help describe the problem. Along the same idea, is it possible to change the default Response Body? Currently, it's returning {"error":"USER is not authorized to perform the requested action."} , which is fine, but I'd like to return a custom JSON object if possible.

Delphi DataSnap authorization not repecting TRoleAuth attribute

假装没事ソ 提交于 2019-12-09 12:57:29
问题 I am trying to implement authorization in a Delphi XE DataSnap application. I broke this down into a very simple example, but still do not see the effects of the TRoleAuth attribute for a method or class. Here is a simple DSServerMethods class that includes the generated sample methods. The class has been decorated with the guest and anyone authorized roles, and the unwelcome denied role. The ReverseString method has been decorated with the readonly denied role: type [TRoleAuth('guest,anyone'

Datasnap RESTful JSON Result About?

北城余情 提交于 2019-12-08 08:59:31
问题 I have a TDataset JSON helper function. I want to result return the following: {"result":[{"rid":"2","firstname":"veli","lastname":"deli"},{"rid":"1","firstname":"ismail","lastname":"kocacan"}]} But.Does not work.The return the following: {"result":[[{"rid":"2","firstname":"veli","lastname":"deli"},{"rid":"1","firstname":"ismail","lastname":"kocacan"}]]} I want to remove extra [ character... How to extract this data and return ? {"rid":"2","firstname":"veli","lastname":"deli"},{"rid":"1",

execute dynamic sql in datasnap client

老子叫甜甜 提交于 2019-12-08 06:33:57
问题 Is it possible to share database connection between datasnap server and client? I want to execute dynamic sql in client and receive results. 回答1: I found 2 ways to execute dynamic sql in client side 1) Using DbxConnection (dbExpress) // Server code function TServerMethods1.GetConnection: TDbxConnection; begin Result := DBConnection.DBXConnection; end; //Client code dbxConnection := ServerMethods.GetConnection; command := dbxConnection.CreateCommand; command.Text := 'SELECT COUNT(1) FROM

ApplyUpdates on REST with Firedac

醉酒当歌 提交于 2019-12-08 03:35:07
问题 My project uses a REST server with FireDac. I have a generic function that makes all my Selects but when I try to ApplyUpdates if does nothings. No message, no crash, it just keeps going and the data is not reflected to the database. My Code: function TServerMethods.ApplyUpdates(banco, tabela : String; const DeltaList: TFDJSONDeltas; var Mensagem : String) : Boolean; var LApply : IFDJSONDeltasApplyUpdates; Query : TFDQuery; begin mensagem := ''; result := false; try try LApply :=

Delphi XE2 DataSnap Server - HTTPS 'Could not load certificate'

[亡魂溺海] 提交于 2019-12-07 15:32:57
问题 I have an existing DataSnap server (Windows service) which is running fine on HTTP, and I now want to add HTTPS as an additional protocol. I've obtained and installed an SSL certificate and generated a certificate file (.crt) and private key file (.key). As a test, when using the Delphi XE2 DataSnap Server wizard and ticking 'HTTPS' to get the certificate page, I can reference the 2 files and click the 'Test' button which succeeds. I've added an additional TDSHTTPService component and linked

How do I get a stack trace from a handled/caught exception and dump it to a trace log

折月煮酒 提交于 2019-12-07 08:15:04
问题 We've created a Datasnap service (with Delphi XE), using Bob Swart's white paper as a guide. It works fine, and we've deployed it to our test server. Now a problem occurs, when we have executed a large number of requests (through JMeter), some sort of memory corruption occurs. Some requests succeed, some fail with an access violation. In the end, it has become so corrupt, that every request to our OWN (not the DSAdmin) methods responds with an access violation. However, I can't get my hands

How can I supress Delphi DataSnap error message dialogs?

夙愿已清 提交于 2019-12-07 05:46:41
问题 We run a DataSnap Delphi 2009 application on Windows 2003 Server. DataSnap Client and Server are on the same computer, using DCOM over Borland Socketserver. The client runs a background batch job. Sometimes, we discover that the client can not connect to the server application and displays a message dialog on the server desktop indicating for example "Could not connect to server. Network path could not be found." or "Objectexporter not found." Our Delphi client code never uses a message

ApplyUpdates on REST with Firedac

白昼怎懂夜的黑 提交于 2019-12-06 15:18:31
My project uses a REST server with FireDac. I have a generic function that makes all my Selects but when I try to ApplyUpdates if does nothings. No message, no crash, it just keeps going and the data is not reflected to the database. My Code: function TServerMethods.ApplyUpdates(banco, tabela : String; const DeltaList: TFDJSONDeltas; var Mensagem : String) : Boolean; var LApply : IFDJSONDeltasApplyUpdates; Query : TFDQuery; begin mensagem := ''; result := false; try try LApply := TFDJSONDeltasApplyUpdates.Create(DeltaList); Query := CriaQuery(banco,Tabela); Query.Open(); LApply.ApplyUpdates