firedac

How can a TClientDataSet determine what type of database it is (remotely) connected to?

懵懂的女人 提交于 2019-12-11 02:36:50
问题 Under FireDAC, I have a TFDConnection -> TFDQuery -> TDataSetProvider in a server app and a TClientDataSet in a client app. They are connected through the RemObjects Remoting SDK. (The TClientDataSet.RemoteServer is set to a TRODataSnapConnection ). The TFDConnection may be connected to different database types. With the TClientDataSet code in the client, (how) can I determine the database type? For a simple app containing all these components I could scan the datamodule for a component of

Setting up a second TFDPhysFBDriverLink - possible and necessary?

感情迁移 提交于 2019-12-11 02:36:27
问题 My application has a design time TFDConnection and TFDPhysFBDriverLink as source connection. This may or may not be opened in Firebird embedded mode (if so, FDPhysFBDriverLink.VendorLib := 'fbembed.dll' is set (32 bits)). I create a run-time target TFDConnection which must use embedded Firebird because we do not know if Firebird is installed on the PC (our setup supplies fbembed.dll ). How do I set this up? At runtime I can create another TFDPhysFBDriverLink and set its VendorLib, but how

Delphi EMS FireDAC: How to pass parameter from client to server using EMS?

℡╲_俬逩灬. 提交于 2019-12-10 15:48:28
问题 I am working on the simple client server application using EMS (i.e: for future iOS application) in Delphi. On the client unit, I have EMSProvider and EMSFireDACClient which fetches data from a Database (MSSQL) through a Datasource. On the server unit, I have FDConnection and TFDQuery which deals with my Database. So far everything is working fine. Question: Now I need to pass some parameters from client to the server and that fetches the result data. How should I do using EMS ? Any functions

Issue with TFDQuery on a form connecting to a datamodule

≯℡__Kan透↙ 提交于 2019-12-10 12:19:55
问题 I have a datamodule with a TFDConnection connecting to a SQLLite db. Queries on the datamodule work fine. But if I have a query on a form connecting to the connection on the datamodule when setting Active to true I get the error: exception message : [FireDAC][Comp][Clnt]-512. Connection is not defined for [FDQuery1]. Possible reason: Connection and ConnectionName property values This happens in design time. This is with Delphi Tokyo in a Firemonkey mobile app. 回答1: I think this may be a

SQLite FireDAC trailing spaces

吃可爱长大的小学妹 提交于 2019-12-09 03:38:48
问题 I'm using Delphi XE7 with FireDAC to access SQLite. When I put data into a TEXT field, any trailing spaces or #0 characters get truncated. Is there something I can change in either SQLite or FireDAC to have it preserve the trailing white space? // The trailing spaces after Command don't come back from SQLite. fFireDACQuery.ParamByName(kSQLFieldScriptCommands).AsString := 'Command '; 回答1: Disable the StrsTrim property. This property is described as: TFDFormatOptions.StrsTrim Controls the

Delphi Firedac TFDtable open issue

狂风中的少年 提交于 2019-12-08 06:09:03
问题 I am working on Delphi XE6 project. I am using Firedac for PostgreSQL connection. There are two datamodules in this project and there are almost 20 TFDtables components on these data modules. On create event of datamodules I am doing "TFDtable.open" for all tables. These tables contains lots of data say 700000 to 800000 entries. Issue is with loading of data. It takes atleast 20 sec to load Is there any other way out to make it faster? 回答1: It seems that you're implementing so called Live

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 :=

When PostgreSQL stops TFDConnection.Connected remains True

半腔热情 提交于 2019-12-07 19:40:08
问题 I am connecting to PostgreSQL 9.5 x64 using Delphi 10 and FireDAC. There is a reconnect feature in my software which relies on TFDConnection.Connected flag: if not _conn.Connected then if _autoConnect then _conn.Connected := True else raise Exception.Create('Not connected to database'); After I connect my software to PostgreSQL and start executing queries, I go to Windows services control panel and stop-start PostgreSQL server in order to test the reconnect feature. After starting PostgreSQL

XE4/FireDAC uADStanCipher not found error

心不动则不痛 提交于 2019-12-07 14:17:33
When I try to compile my XE4/FireDAC project I receive the following error: [dcc32 Fatal Error] uADPhysSQLiteCli.pas(992): F1026 File not found: '<project path>\uADStanCipher.dcu' I have searched for solutions and it seems that the file is not distributed with the standard FireDAC installer due to export restrictions. Some Google results refer to the link http://cc.embarcadero.com/item/29376 . It appears that the link should allow you to download the correct file. Unfortunately I receive an Unavailable Submission error. I am a fully registered user of XE4. Has anybody found a solution to this

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