Thread: XE6 Firemonkey - SQLite DB deploys and works on simulator but NOT on device
 |
This question is not answered.
Helpful answers available: 2.
Correct answers available: 1.
|
|
Replies:
2
-
Last Post:
Sep 19, 2014 5:42 AM
Last Post By: Keith Marbach
|
|
|
Posts:
69
Registered:
8/21/01
|
|
How often does this happen! 5 minutes after posting question I got it to work. I deleted the app off the ipad. The next time I ran it it worked! It took me a day and a half to fully configure the mac and do everything I needed with certificates, profiles, etc, I hope the investment of time is worth it.
----
Original message below
----
I'm on day 2 of trying to get this to work so ready for help, if someone can (tia).
I have a very simple XE6 FireMonkey mobile app with a TFDConnection and a TFDQuery. I am deploying a SQLite db to "StartUp\Documents\" (minus double quotes). The query pulls a field from a table with a select statement. It works fine on the iPhone simulator (running on new Mac laptop) but when I try to run on an ipad (ios 5.1.1) I get message that the table does not exist - "[FireDAC][Phys][SQLite] ERROR: no such table: config."
In the BeforeConnect of the FDConn I have:
LocalDBConn.Params.Values['Database'] := '$(DOC)/test.sdb';
I haven't developed ios apps before so that is one hurdle.
Another is that I don't know how to see that the db file is actually being deployed, is there an app I can run on the mac or ipad to make sure test.sdb is present?
Any help or suggestion is appreciated.
Keith
Edited by: Keith Marbach on Sep 16, 2014 9:57 AM
|
|
|
Posts:
1
Registered:
3/2/08
|
|
delete string connectiondefname in design mode
close all connection
uses System.IOUtils;
in beforeconnect
begin
try
LocalDBConn.Params.Values['Database'] := TPath.Combine(TPath.GetDocumentsPath, 'test.sdb'); // or only TPath.GetDocumentsPath + PathDelim +'test.sdb';
except
on E: Exception do
begin
ShowMessage(E.Message);
end;
end;
end;
in form onshow (oncreate) or in your button
fdquery1.active:=true;
I hope to be a help
Edited by: maria uana on Sep 16, 2014 5:18 PM
Edited by: maria uana on Sep 16, 2014 5:21 PM
|
|
|
|
Posts:
69
Registered:
8/21/01
|
|
close all connection
GOOD ADVICE!
ShowMessage(E.Message);
Not so good... ShowMEssage does not work for me in andoid or ios.
Thank you. What finally helped me was to completely remove the app from the ipad and re-install, making sure I had the correct remote path for the deployed SQLite file.
Take care.
|
|
|
|
Legend
|
|
Helpful Answer
(5 pts)
|
|
Correct Answer
(10 pts)
|
|
Connect with Us