How to copy a firedac dataset from FDMemTable to FDTable (SQLite connected) [Edit]

I have TDBGrids connected to FDTable1 via a Datasource component.
FDTable1 is not using CachedUpdates.

When I ran the code, looking at the TDBGrid, the data is copied.
But when I open the SQLite database containing FDTable1, the table how is empty!

// Copy query results to a FDMemTable. It works OK!
  FDQuery1.SQL.Text:= 'select userno, loginid from user';
  FDQuery1.Open;
  FDQuery1.FetchAll;
  FDMemTable1.Active:= False;
  FDMemTable1.Data:= FDQuery1.Data;
  FDMemTable1.Active:= True;

// Copy from FDMemTable to FDTable.
  FDConnection1.Offline;
  FDTable1.Active:= False;
  FDTable1.Data:= FDMemTable1.Data;
  FDConnection1.Online;
  FDTable1.Active:= True;

Any idea what could be wrong?

Edited by: Simon Lee on Feb 5, 2015 10:36 PM
0
Simon
2/5/2015 1:01:01 AM
embarcadero.delphi.firedac 822 articles. 2 followers. Follow

0 Replies
1801 Views

Similar Articles

[PageSpeed] 59

Reply:

Similar Artilces:

How to copy a firedac dataset from FDMemTable to FDTable (SQLite connected) [Edit] #2
I have TDBGrids connected to FDTable1 via a Datasource component. FDTable1 is not using CachedUpdates. When I ran the code, looking at the TDBGrid, the data is copied. But when I open the SQLite database containing FDTable1, the table however is empty! // Copy query results to a FDMemTable. It works OK! FDQuery1.SQL.Text:= 'select userno, loginid from user'; FDQuery1.Open; FDQuery1.FetchAll; FDMemTable1.Active:= False; FDMemTable1.Data:= FDQuery1.Data; FDMemTable1.Active:= True; // Copy from FDMemTable to FDTable. FDConnection1.Offline; FDTable1.Activ...

How to copy a firedac dataset from a FDMemTable to FDTable (connected to SQ
I have TDBGrids connected to FDTable1 via a Datasource component. FDTable1 is not using CachedUpdates. When I ran the above code, looking at the TDBGrid, the data is copied. But when I open the SQLite database containing FDTable1, the table how is empty! Codeā€¦ // Copy query results to a FDMemTable. It works OK! FDQuery1.SQL.Text:= 'select userno, loginid from user'; FDQuery1.Open; FDQuery1.FetchAll; FDMemTable1.Active:= False; FDMemTable1.Data:= FDQuery1.Data; FDMemTable1.Active:= True; // Copy from FDMemTable to FDTable. FDConnection1.Offline; FDTable...

Cant connect to Sqlite with DbExpress or FireDac, what am I doing wrong [Edit]
Hi All, Have up till now developed using Delphi XE3 TadoConnection -> Msaccess Jet.oledb.4 Tdatasource - TAdoQuery TAdoQuery - TAdoconnection Use DBEdit and DGrid and all works well, but would now like to change to Sqlilte and have treid a number of Guides with DBExpress and Firedac and the only thing that sort of worked was a Youtube guide from Alister Christie using DBExpress BUT as soon as try to Add a TsqlQuery to pullup the data, I can get the Query to access the data BUT the Dbedit fields are NOT editable !!!!!!!, The guide I was following was: TsqlConnection - SQLite DB TSql...

FireDAC mobile app error as sqlite as delphi XE7 [Edit]
i im trying of connect my app as FireDAC but i have some errors. I follor all steps of Mobile_Tutotils_en_pdf file for delphi XE7. First i add one FireDAConnection compoent, after i in FireDAConnection Edito i set DriverID as Sqlite, in Database parameter i set this existing sqlite database "shoplist.s3db i create this database and table as other tool, and i can to add this to DBExpres in data exploer and i can to use it in one mobile delphi project", and i set lockingmode to normal as this manual tell. After as tell in page 269 of this manual when i click over test button, i ...

FireDAC mobile app error as sqlite as delphi XE7 [Edit] #2
i im trying of connect my app as FireDAC but i have some errors. I follow all steps of Mobile_Tutotils_en_pdf file for delphi XE7. First i add one FireDAConnection compoent, after i in FireDAConnection Edit i set DriverID as Sqlite, in Database parameter i set this existing sqlite database "shoplist.s3db , and i set lockingmode to normal as this manual tell. I After i follow steps 1,2,3,4 and in the step 5 of the page 265 when i try of to set Connected property to true, i get this error: 1. [FireDac][Comp][Clnt]-340. Driver ID is not defined. Set TFDConnection.DriverName or Add D...

Delphi XE6 FireDAC SQLite copy a table from one database to another
How do I copy a single table from one SQLite database to another? Is there a simple command to do this? Thanks! > How do I copy a single table from one SQLite database to another? Is there a simple command to do this? Thanks! You should use ATTACH command. For example: {code} ATTACH 'c:\secondDB.sdb' AS sec; INSERT INTO SomeTab SELECT * FROM sec.SomeTab; {code} -- With best regards, Dmitry Arefiev / FireDAC Architect Thanks! > {quote:title=Dmitry Arefiev wrote:}{quote} > > How do I copy a single table from one SQLite database to another? Is there a...

FireDAC and Delphi Pro XE4... firedac tab not visible?
I am moving from a very old Borland product (2006) to Delphi XE4 Professional with FireDAC addon. I purchased both from Embarcadero, and have downloaded both. The documentation says the FireDAC components should automagically appear in the tabset for Delphi. They do not. I don't want to fool around too much as my environment is strictly controlled by IT, and they are very slow to do anything. Is there something that I should have done, but did not do? I installed XE4 first, registered it, then used the link in my email from Embarcadero to download the FireDAC components. Then I ra...

FireDac Connection Problem [Edit]
On my first attempt to use FireDac (with a Firebird 2.5.2 sample DB) in Delphi/RAD Studio XE3 I'm having problems getting a connection. This is my Connection String: Provider=MSDASQL.1;Password=masterkey;Persist Security Info=True;User ID=SYSDBA;Data Source=C:\Program Files\Firebird\Firebird_2_5\examples\empbuild\employee.fdb;Mode=ReadWrite On testing the connection I get *Test connection failed because of an error in initializing provider. Unspecified error.* Have I chosen incorrect provider? Appreciated some help so I can move forward Edited by: Adam Gatt on Jun 6, 2013 4:...

Copy Decimal Field FireDac [Edit]
Hello, Using FireDac I want to copy a database to another database (not necessary in the same driver, existing or not). To do that, I've got two connections, two TFDTable and I assign the FieldDefs of my source table into the FieldDefs of my destination table and I call the CreateTable of the TFDTable. It works fine or nearly. In fact if I have a field Decimal(18,4), my result Field is Decimal(4)... I think the problem comes from the FireDAC.Phys.SQLGenerator unit : {code} function TFDPhysCommandGenerator.GetColumnDim(ASize, APrec, AScale, ADefSize, ADefPrec, ADefScale: Integer): S...

FireDAC copying a table from SQLite to MySQL
Is there a way to do the following: ATTACH 'c:\secondDB.sdb' AS sec; INSERT INTO SomeTab SELECT * FROM sec.SomeTab; where one table is in a SQLite DB and the other is in a MySQL DB (or any other non-SQLite DB)? Thanks! Larry While I have never used it, I believe TFDDataMove will do what you want here. Larry X wrote: > Is there a way to do the following: > > ATTACH 'c:\secondDB.sdb' AS sec; > INSERT INTO SomeTab SELECT * FROM sec.SomeTab; > > where one table is in a SQLite DB and the other is in a MySQL DB (or any other non-SQLite DB)?...

How to setup FireDac for slow connections [Edit]
I have some existing MS Access database on network which must be accessed by many users. I have done simple app with FireDac components and all works fine when accessed through fast network (LAN over optic cable). Pesimistic locking is used.. But users which are in distant cities are connected through ADSL connection and VPN to this LAN. When exe is loaded, and db is queryed error message is following: [FireDAC][Phys][ODBC][Microsoft][ODBC Microsoft Access Driver] (unknown) is not valid path.. What seams to be a problem? All other users have no this issue inside faster network. Is ...

Delphi FireDAC SQLite RecNo = -1
RecNo for a FireDAC FDTable in an SQLite database equals -1 even though the cursor is on the last of 1,200,000 records. What is that all about? http://docwiki.embarcadero.com/Libraries/XE7/en/FireDAC.Stan.Option.TFDFetchOptions.LiveWindowParanoic -- With best regards, Dmitry Arefiev / FireDAC Architect ...

FireDAC SQLite slowdown on Mac [Edit]
My XE7 FireUI app uses FireDAC with SQLite. What would cause my app to do database transactions about 12 times faster on Windows than on Macintosh? Sample project is here: https://forums.embarcadero.com/thread.jspa?threadID=115042&stqc=true Edited by: Michael Leahy on Apr 29, 2015 5:59 PM to add a sample project. > What would cause my app to do database transactions about 12 times faster on Windows than on Macintosh? FireDAC on Windows uses statically linked SQLite engine, which is updated and compiled by Embarcadero with optimal set of SQLite configuration defines. ...

firedac connect sqlserver problems [Edit]
i use firdac execute an query on my stand-alone vcl application when the server run on my develop environment it run ok when i deploy on the win32 machine wihtout xe develop environment it rais an error : access violation at address 007ff7cb in module 'android.exe'. read of address 00000000' http://www.cnblogs.com/nywh2008/p/3326035.html firedac links : FDConnection1: TFDConnection; FDPhysMSSQLDriverLink1: TFDPhysMSSQLDriverLink; FDQuery1.connection-> FDConnection1 DataSetProvider1.dataset->FDQuery1 ClientDataSet1.providername-> DataS...

Web resources about - How to copy a firedac dataset from FDMemTable to FDTable (SQLite connected) [Edit] - embarcadero.delphi.firedac

Resources last updated: 12/31/2015 5:40:57 PM