Search the Community
Showing results for tags 'tfdmemtable'.
Found 5 results
-
FireDAC - TFDQuery - How to default calculated fields in the dataset to ReadOnly=False
JonathanW posted a topic in Databases
I'm using the FireDAC TFDQuery component to run a SQL SELECT statement against a SQL Server database. The SQL statement contains a few 'calculated' column expressions using SQL functions such as CONVERT and CAST. For example : CONVERT(DECIMAL(9, 6), 0) AS TotalHours and CONVERT(TINYINT, 0) AS WorkflowState. In the resulting dataset, these calculated TField objects are always set to ReadOnly=True. I want to populate these calculated fields in code after the dataset has been returned. I know I can do this by changing the ReadOnly property of each field : Dataset.FieldByName('MyCalcField').ReadOnly := False; But is there a setting/option within the query components that I can use to force the fields created to always default to ReadOnly=False? -
Hi I have discovered that update sql executed via TFDConnection.ExecSQL against a TFDMemTable fails with "List index out of bounds (8)" when there is a calculated field in the dataset. In this case the first calculated field has index 8 (9th field) as referenced in the error message. If I remove the calculated field, the update executes without issue. I assume, then, that the update tries to do something with the calculated fields that it shouldn't... is there a way to avoid this? Thanks
- 1 reply
-
- firedac
- calculated fields
-
(and 1 more)
Tagged with:
-
Hi, I usually use varchar fields in SQL databases with a big number as max size. When I use a TFDMemTable, does the ftstring size consumes memory as described in its definition? If I declare it as "Add('lab',ftstring,500)", does it consumes in memory 500bytes (or 1000bytes) for each record, or as a Delphi string type is just the content string size ? I have Delphi professional and I can not see its code. Thank you in advance
- 2 replies
-
- tfdmemtable
- ftstring
-
(and 2 more)
Tagged with:
-
I have to update an application that has 20 threads running at the same time and each thread is requesting an XML through an http connection. In order to process the received XML, each thread has to use data from 14 TFDMemtables. The Threads are the same running all the time and the TFDMemtables they use are also the same, The TFDMemTables' data are static, received from an external database when application starts, not need to be updated/edited as the application runs. I read that with TFDMemTable you can use clonecursor and have different TFDMemTable object instances with the same data. I though that I could create such a TFDMemTable for each thread before threads start to use them. My question: Can different threads use TFDMemTables object instances (created with data from clonecursor) from an initial TFDMemTable? Is this threadsafe? Thank you in advace
- 4 replies
-
- tfdmemtable
- tthread
-
(and 1 more)
Tagged with:
-
Sqlite give the possibility to create two different ':memory:' databases and attach tables from the one database to the other. Using firedac with a ':memory:' sqlite database, is it possible to attach TFDmemtables as sqlite (virtual) tables? If so, how? Thank you in advance
- 3 replies
-
- sqlite
- tfdmemtable
-
(and 1 more)
Tagged with: