Questions tagged [firedac]

A Delphi/C++Builder data access library, sold by Embarcadero, for developing applications for multiple devices, connected to enterprise databases

FireDAC is a Universal Data Access library for developing applications for multiple devices, connected to enterprise databases. With its powerful universal architecture, FireDAC enables native high-speed direct access from Delphi and C++Builder to InterBase, SQLite, MySQL, SQL Server, Oracle, PostgreSQL, DB2, SQL Anywhere, Advantage DB, Firebird, Access, Informix, DataSnap and more.

See the FireDAC home page for more info

803 questions
3
votes
1 answer

Why does FireDAC ignore index name?

I'm trying to creating a table in a SQL Server database using FireDAC. However, instead of using the index name I provide, FireDAC uses a bad index name, raising an exception and the table does not get created. Am I doing something wrong? If not, is…
Reversed Engineer
  • 1,095
  • 13
  • 26
3
votes
1 answer

What is TFDDatSRow?

I use Delphi 10.3. I try to make a memory database, append data to it and find data in it. I wrote the following code referring other's and it works well. procedure TForm1.DataAppendFind; var _FieldDef: TFieldDef; _FDDatsRow: TFDDatSRow; i:…
SHIN JaeGuk
  • 494
  • 1
  • 5
  • 14
3
votes
1 answer

Insufficient memory when opening TClientDataSet with a REPLACE in the underlying query

My Delphi code opens a TFDQuery (FireDAC), then opens the TClientDataSet connected to it via a TDataSetProvider: ClientDataSetData.Close; with QueryData do begin Close; SQL.Clear; SQL.Add(ASelectSQL); Open; end; …
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
3
votes
1 answer

Casting a parameter value in INSERT query gives arithmetic overflow when BCD mapping rules are active

Consider this table in an MSSQL database: CREATE TABLE dbo.TESTPAR ( ID INTEGER NOT NULL, YR VARCHAR(50) NULL ) I have a TFDQuery with command text: insert into TESTPAR (ID,YR) values(:ID,cast(:YR as varchar(4))) This has two ftInteger ptInput…
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
3
votes
1 answer

Dropping table fails with 'unsuccessful metadata update' when using embedded Firebird

My code does the following: Set up a design time target TFDConnection Create a run time source TFDConnection Drop all indices and tables in target Recreate those Copy all data from source to target Drop one of those tables (and indices), named…
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
3
votes
1 answer

Capture mysql_real_query from FireDAC connection

How can I capture just the mysql_real_query on a FireDAC connection? I have a FireDac connection on Delphi with a TFDMoniCustomClientLink. I need to capture just mysqL_real_query. I tried enabling and disabling all the EventKinds, but I could't find…
Samuel
  • 259
  • 3
  • 15
3
votes
1 answer

How to quote field names in FireDAC in Delphi

I'm working on an application that runs on multiple databases, many of which have their own way of quoting reserved words as field names for example For example select `key` from mytable or select "key" from mytable or select [key] from…
Alister
  • 6,527
  • 4
  • 46
  • 70
3
votes
1 answer

How to set transaction LOCK TIMEOUT for Firebird (InterBase) using FireDAC?

The TFDConnection seems to have no setting for the LOCK TIMEOUT when using TFDConnection.UpdateOptions.LockMode := lmPessimistic; TFDConnection.UpdateOptions.LockWait := true; A TFDTransaction also does not seem to have properties for it. The…
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
3
votes
1 answer

Read-only TClientDataSet Refresh fails with key violation

I get a key violation on the Refresh in the below code. EmployeeContracts is a TClientDataSet coupled through a TDataSetProvider to a TFDQuery with SQL: select ec.* from tt_emp e, tt_emp_contract ec where (coalesce(e.tt_nonactive,0)=0) and…
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
3
votes
0 answers

When PostgreSQL stops TFDConnection.Connected remains True

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 …
Paul
  • 25,812
  • 38
  • 124
  • 247
3
votes
1 answer

FDQuery append gives error "no such table"

In Delphi 10.1 I made a small program to learn about FireDAC and SQlite. I have FDConnection, FDQuery (with SQL= SELECT * FROM Sætning) and DataSource + DBGrid. The DBGrid shows the (empty) table Sætning. I want to put data into my table from a…
larshgf
  • 43
  • 4
3
votes
1 answer

How to get the table name from a column in a join query with SQL Server and FIREDAC?

I looking for get metadata on a TFDQuery (FireDAC). I have this query: SELECT * FROM Table1 t1 INNER JOIN Table2 t2 ON t1.Code = t2.code I would like to know the column information (table name, the real column name in the table, ....) I find this…
Joc02
  • 345
  • 8
  • 18
3
votes
1 answer

Insert just the date to MS access database using FireDac

I have a table called Students , in this table there is a date column called BirthDay with Date, abbreviated format (eg : 26/06/2017), the problem is in delphi the Field type is SQLTimeStamp, and I want to save just the Date not a…
Ilyes
  • 14,640
  • 4
  • 29
  • 55
3
votes
2 answers

Delphi and Firedac : query Active vs query Open

Most of my application's forms use 2 or more db grids : basically, the user clicks a record in main grid and get child results in a secondary grid. All my primary DBGrids FDQueries (that is the one with SELECT) have been set on the form but none are…
Mathmathou
  • 373
  • 4
  • 15
3
votes
1 answer

Create table with firedac without SQL Script

Firedac library centralizes database behavior and have a lot of methods which works fine without care about the Database Type. Actually, using native drivers for most common databases, Firedac hides subtle differences on syntax allowing very…