firedac

How to properly access a VARCHAR(MAX) parameter value of a FireDAC dataset when getting “data too large for variable” error?

☆樱花仙子☆ 提交于 2020-01-05 07:42:53
问题 Our application updates and accesses data using SQL Server 2014. I have a table of which the last column ('Contents') is created as VARCHAR(MAX) . We are using Delphi XE8, and are using a FireDAC TFDQuery component to update this column. ..... FDquery.ParamByName('Contents').AsString:=Contents; FDquery.ExecSQL; When running this update, I get the following error: Exception raised with message [FireDAC][Phys][ODBC]-345. Data too large for variable [CONTENTS]. Max len = [8002], actual len =

TFDMoniFlatFileClientLink irregularly does not trace to file

不羁岁月 提交于 2020-01-05 06:33:44
问题 I have a TFDMoniFlatFileClientLink on a form, filename set to d:\temp\monitor.txt , tracing=true, TFDConnection.Params.MonitorBy=mbFlatFile . This sometimes works and sometimes does not trace anything. No file gets created. Tested with Win7 32-bit app, with design time TFDConnection to either FireBird or Oracle. Delphi Tokyo 10.2.1 What is going on? 回答1: This was a really weird bug: It turns out that the TFDMoniFlatFileClientLink remembers the filename when removed and placed back, then does

TFDMoniFlatFileClientLink irregularly does not trace to file

泄露秘密 提交于 2020-01-05 06:33:18
问题 I have a TFDMoniFlatFileClientLink on a form, filename set to d:\temp\monitor.txt , tracing=true, TFDConnection.Params.MonitorBy=mbFlatFile . This sometimes works and sometimes does not trace anything. No file gets created. Tested with Win7 32-bit app, with design time TFDConnection to either FireBird or Oracle. Delphi Tokyo 10.2.1 What is going on? 回答1: This was a really weird bug: It turns out that the TFDMoniFlatFileClientLink remembers the filename when removed and placed back, then does

TFDMoniFlatFileClientLink irregularly does not trace to file

萝らか妹 提交于 2020-01-05 06:33:07
问题 I have a TFDMoniFlatFileClientLink on a form, filename set to d:\temp\monitor.txt , tracing=true, TFDConnection.Params.MonitorBy=mbFlatFile . This sometimes works and sometimes does not trace anything. No file gets created. Tested with Win7 32-bit app, with design time TFDConnection to either FireBird or Oracle. Delphi Tokyo 10.2.1 What is going on? 回答1: This was a really weird bug: It turns out that the TFDMoniFlatFileClientLink remembers the filename when removed and placed back, then does

Firedac select working with Firebird returns no records

混江龙づ霸主 提交于 2020-01-04 05:45:19
问题 Hello I'm working with Firedac (Delphi Seattle) using Firebird (2.5) as a database, when I run this query using a TFDQuery, no records are returned: SELECT ID FROM USERS WHERE PWD = 'êHÆ–!+' The same query within a Database program as IbExpert return one record. Is there some parameter with Firedac components to configure that can solve this issue. Thanks. 回答1: It's in the query string and it's the ! char. By default, query strings are preprocessed, and you must escape constant chars like ! ,

XE4/FireDAC uADStanCipher not found error

痴心易碎 提交于 2020-01-03 03:07:08
问题 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

What is the proper way to dynamically create and call a stored procedure in Delphi using FireDac?

只谈情不闲聊 提交于 2020-01-01 15:05:11
问题 I am relatively new to FireDAC. I want to be able to call a stored procedure "on the fly", dynamically. So far I have the following: function TForm21.ExecuteStoredProc(aSPName: string; aParams: TADParams): Boolean; var LSP: TADStoredProc; i: Integer; begin LSP := TADStoredProc.Create(nil); try LSP.Connection := ADConnection1; LSP.StoredProcName := aSPName; LSP.Prepare; for i := 0 to aParams.Count - 1 do begin LSP.Params[i].Value := aParams[i].Value; end; LSP.ExecProc; finally LSP.Free; end;

Delphi - View with parameter

血红的双手。 提交于 2019-12-25 08:24:56
问题 I have the following View: CREATE OR ALTER VIEW "ButtonGroup_ButtonNames_view"("ButtonName") AS select "ButtonName" from "ButtonGroupName_ButtonName" where "ButtonGroupName_ButtonName"."ButtonGroupName" = ':lButtonGroupName' The ':lButtonGroupName' is suppoused to work as a parameter, so at runtime I can set a value to it. When I run the application, I get the parameter name not found error. I guess this is not the correct way to declare a parameter inside a view . Is it possible anyway?

How to use the RecsSkip and RecsMax property of TFDQuery at runtime

為{幸葍}努か 提交于 2019-12-24 07:57:33
问题 I was looking for a skip and take selection in the TFDQuery. The properties I found are .FetchOptions.RecsSkip and .FetchOptions.RecsMax. I use Tokyo 10.2.3 and database Firebird 3 I make the query at runtime and I want to get the start record at 5 and get the 8 next records. I to something like: Result does not skip the fist 5 records var qryTest: TFDQuery; begin qryTest:= TFDQuery.Create(self); qryTest.Connection := self.FDConnection; qryTest.sql.Text:= ' select * from

How to use the RecsSkip and RecsMax property of TFDQuery at runtime

随声附和 提交于 2019-12-24 07:57:01
问题 I was looking for a skip and take selection in the TFDQuery. The properties I found are .FetchOptions.RecsSkip and .FetchOptions.RecsMax. I use Tokyo 10.2.3 and database Firebird 3 I make the query at runtime and I want to get the start record at 5 and get the 8 next records. I to something like: Result does not skip the fist 5 records var qryTest: TFDQuery; begin qryTest:= TFDQuery.Create(self); qryTest.Connection := self.FDConnection; qryTest.sql.Text:= ' select * from