Unable to see table in SQLite database lazarus / 16-Databases ---------------------------------------------------------------------- mrj2 · 2011-11-04 18:53 I am trying to set up a sqlite database application.  I have put the SQLite database in the same folder as the project files.  I have the components on the form: SQLite3Connection    Name: SQLite3Connection1    DatabaseName: shopper.db    HostName:      localhost    Transaction:   SQLTransaction1    Connected: True SQLQuery    Database:   SQLite3Connection1    Datasource:   Datasource1    SQL:        select * from pur_his_v2    Transaction:   SQLTransaction1 SQLTransaction    Database:  SQLite3Connection1    Name: SQLTransaction1    Active: True Datasource    Dataset: SQLQuery1    Enabled: True    Name: Datasource1 When I set the SQLQuery1 Active property to true. I get a message saying “No such table: pur_his_v2” The table is in the database.  Can anyone help. Thanks ---------------------------------------------------------------------- HappyLarry · 2011-11-04 20:31 Hi Leave the datasource of SQLQuery1 blank - it has no datasource. The datasource of all the components like DBGrid, DBEdit and DBNavigator will be Datasource1. ---------------------------------------------------------------------- mrj2 · 2011-11-04 20:37 Hi and thank. I have made that change but still get the same message; “No such table: pur_his_v2”. ---------------------------------------------------------------------- HappyLarry · 2011-11-04 20:52 Are you sure that  SELECT * FROM pur_his_v2; works properly in SQLIte3? Do you get the proper output with no errors? ---------------------------------------------------------------------- mrj2 · 2011-11-04 20:57 Yes. ---------------------------------------------------------------------- arbelest · 2011-11-05 03:11 Some time ago I got same problem. First check and recheck that your sqlite file path is corrent. If your sqlite file path is wrong or file is not exist, that file will be automatic created. Say that your file store at /home/foo/project/mydata.sqlite3, but you wrong set database path as /home/foo/project/mydate.sqlite3. So mydate.sqlite3 will be automatic create and indeed you connect to wrong database, and all off your tables are not in there. There will be mydate.sqlite3 and mydata.sqlite3 in /home/foo/project folder ---------------------------------------------------------------------- mrj2 · 2011-11-06 10:14 Quote from: arbelest on November 05, 2011, 04:11:22 amSome time ago I got same problem. First check and recheck that your sqlite file path is corrent. If your sqlite file path is wrong or file is not exist, that file will be automatic created. Say that your file store at /home/foo/project/mydata.sqlite3, but you wrong set database path as /home/foo/project/mydate.sqlite3. So mydate.sqlite3 will be automatic create and indeed you connect to wrong database, and all off your tables are not in there. There will be mydate.sqlite3 and mydata.sqlite3 in /home/foo/project folder Well; what can I say except a huge thank you.  This was the problem and it now works fine.  Many many thanks!!