firedac

Registering a Firebird Blob Filter using FireDac (Delphi)

十年热恋 提交于 2020-01-25 11:19:10
问题 Having used Firebird SQL and Delphi for years I have always registered my own Blob Filters using FBPlus from Devrace. As Delphi now ships with FireDac I am hoping to shift over to this technology, removing the requirement of third party data access components. Has anyone any experience with registering Firebird SQL Blob filters in FireDac? Though I can simply access the fields as binary data and run through the routines for decompression etc, I would rather have access on a field level

FireDAC ResultConnectionDef and information about Server and Port

馋奶兔 提交于 2020-01-16 18:41:27
问题 DelphiXE 10.2.2 Was checking here old http://codeverge.com topic where back then was working, but now with ResultConnectionDef for getting information about established connection (Server and Port). ZeosLib (ZeosDBO) code: procedure TMainForm.UpdateCaption; begin Caption := Format('Truice %s - Connection: %s:%d / %s', [VERSION_EXE, MyTrinityConnection.HostName, MyTrinityConnection.Port, GetDBVersion]); Application.Title := Caption; end; With FireDac: uses FireDAC.Phys.MySQLDef, FireDAC.Stan

Append TFDMemTable data into one XML file

与世无争的帅哥 提交于 2020-01-16 01:54:27
问题 Is there any way to save all the database records and structures for multiple queries into one XML file? What I did is: procedure CopyRecords(Sender: TObject); begin try TFDQuery.SQL.Text := 'SELECT * FROM SAMPLE_TABLE1'; TFDQuery.FetchOptions.Unidirectional := False; TFDQuery.Open; TFDQuery.FetchAll; TFDmemtable.Data := DM.qry_SQL.Data; TFDmemtable.First; while not TFDmemtable.Eof do begin TFDmemtable.Edit; TFDmemtable.Post; TFDmemtable.Next; end; TFDmemtable.SaveToFile('C:\Test.xml', sfXML)

Proven/recommended way to migrate application from FIB+ to Fire-DAC components

元气小坏坏 提交于 2020-01-15 12:32:47
问题 I'm migrating a large family of applications having hardwired FIB+ connectivity inside to Fire-Dac components and I'm looking for some least painfull way, how to do it. First, I've decoupled and migrated the backend to get connectivity neutral and connectivity dependend parts and refactored existing applications manually. I've written FireDac parts as well. To migrate Delphi code it seems to be no problem... But big pain in the ass seems to be a migration of components placed on forms and

TFDQuery.Prepare cannot determine parameter types for INSERT query on MS SQL SERVER

旧时模样 提交于 2020-01-10 04:36:27
问题 I open a TFDConnection for MS SQL Server with parameters: DriverID=MSSQL Password=test User_Name=test Server=VS2003-2008 Database=test Single Connection=TRUE Max Cursors=256 USE OLEDB=TRUE I then create a TFDQuery (run time), set its connection to the above, fill it with an parameterized INSERT query: insert into TT_ACT (TT_ACT_ID,TT_PARENT_ID,TT_FROMDATE,TT_TODATE,TT_NAME,TT_NR,TT_CODE,TT_GROUP...) values (:TT_ACT_ID,:TT_PARENT_ID,:TT_FROMDATE,:TT_TODATE,:TT_NAME,:TT_NR,:TT_CODE,:TT_GROUP,..

How to filter FireDAC dataset by a DATE value constant?

ε祈祈猫儿з 提交于 2020-01-07 06:24:14
问题 procedure TForm2.Button1Click(Sender: TObject); begin with qryWithFilter do begin Filtered := False; OnFilterRecord := nil; // date separator may be used any from [' ', '-', '\', '.', '/'] // Filter := 'DATA_NAS < (''DatetoStr(date3)'')'; // Filter := 'DATA_NAS < ''28/06/1939'''; // Filter := 'DATA_NAS < (FormatDateTime(''dd/mm/yyyy'', ''28/06/1968''))'; // Filter := 'DATA_NAS < TO_DATE(''1996-07-29'',''yyyy-mm-dd'')'; Filter := 'DATA_NAS < (TO_DATE(''1996-07-29'',''yyyy-mm-dd''))'; Filtered

FDPhysFBDriverLink behaving weirdly with VendorLib Path

蓝咒 提交于 2020-01-05 07:52:31
问题 I'm starting my first application with FireDAC and Firebird 3.0 and I'm having this weird problem with FDPhysFBDriverLink . Setting it up requires you to set VendorHome and VendorLib to get the driver link working... When I set them, the driver keeps adding "\bin\" to the end of my VendorHome path. For example: In runtime my application FDPhysFBDriverLink 's properties are set like this: FDPhysFBDriverLink.VendorHome := ExtractFilePath(Application.ExeName); FDPhysFBDriverLink.VendorLib :=