dkounal 3 Posted November 22, 2020 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 Share this post Link to post
Dmitry Arefiev 101 Posted November 23, 2020 http://docwiki.embarcadero.com/RADStudio/Sydney/en/Local_SQL_(FireDAC) Share this post Link to post
dkounal 3 Posted November 23, 2020 37 minutes ago, Dmitry Arefiev said: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Local_SQL_(FireDAC) Thank you very much for your response I have seen this documentation and I have already used TFDlocalSQL with TFDMemTables ONLY The question is: In an existing TFDConnection fot SQLite with TFDTables and TFDQueries attached to it, can I add also a TFDLocalSQL and attach TFDMemTables? I notice for example that multiple results are not supported that "If the application is using base datasets and local datasets connected to the same SQLite connection, the connection must be enabled explicitly before any dataset on this connection is opened/executed/prepared. Otherwise, an exception is raised." I am not having the Enterprise version and I am a bit blind to use it in many cases, like the TFDDatSRow object that is not explained anywhere neither in the book of Jensen. I have also find that in the above link, the examples at the end of the page goes to a Not Found http error Thank you again in advance Share this post Link to post
Guest Posted November 24, 2020 (edited) see if my samples help you, here using SQLite driver on "memory" database ==> :memory: on two FDConnnection components, but you can use DB distincts, as you desire! IMPORTANT: Datasets with "unique names" in all system the order of open can necessary to avoid "AV" when creating by code is necessary add (register) the "datasets" with "names" on LocalSQL component - see on Help System! when open this project you can see some "errors", but is because the components is defined as "open" by default here! just close all datasets, LocalSQL and FDConns using FDMemTables, you needs save the "structure", firstly to use in LocalSQL - of course, already in tables, the structures already is saved on Database file! RAD Studio 10.3.3 Arch VCL project in 32bits Form components: Project source VCL_LocalSQL_and_FDMemTable_FDQuery_2_FDConnection_SQLite_DB_in_Memory.zip hug Edited November 24, 2020 by Guest Share this post Link to post