[SOLVED]SQLdb and SQLite3 lazarus / 16-Databases ---------------------------------------------------------------------- jaylm3 · 2012-08-02 18:52 I am on a mac running Snow leopard 10.6.8, using FPC 2.6, Lazarus 1.0 and SQLite 3.6.12 I wanted to try setting up a connection to a SQLite database I located in the folder where the project directory is located. I have tried this with TSQLite3Dataset and it connected. Since this was only a test run I did not use a datamodule but instead just dropped items on Form1. Specifically: TSQLite3Connection where I set   Database Name to  ContactsDataset TSQLTransaction  where I set   Database          to SQLite3Connection1   Name               to  SQLTransaction1 I could then set on TSQLite3Connection   Transaction  to SQLTransaction1 both of the above could then have active/Connected properties set to true with no message popping up. i then added TSQLQuery   set Database to SQLConnection1   and Transaction to SQLtransaction1   and SQL to SELECT * FROM Contacts But when I try to set Active to True i get the message no such table Contacts however using the Sqlite3 commandline interace in Terminal I can see that this table exists. Since I have actually tried this on a Win7 32 bit unit, a Linux 64 bit unit in addition to my macbook clearly it is something that I am probably doing incorrectly but i am lost as to what. Any thoughts or points? Thanks in advance jlm ---------------------------------------------------------------------- BigChimp · 2012-08-02 22:04 Haven't read your post in detail, but just a quick remark. Sqlite creates the database for you if it doesn't exist. Often you'll therefore get the error "can't find table blah" when in reality sqlite couldn't find your database. Perhaps there's something wrong with the location where sqlite is looking for the database file... Thanks, BigChimp ---------------------------------------------------------------------- Leledumbo · 2012-08-03 00:46 QuoteTSQLite3Connection where I set   Database Name to  ContactsDatasetTry using absolute path, even if the ContactsDataset file (are you sure this is the filename?) is in the current directory. ---------------------------------------------------------------------- jaylm3 · 2012-08-03 08:13 Big Chimp & Leledumbo; Many thanks for your assistance. Filename was correct but it needed the pathname. Once I put that in it worked. I thought that if it could not find the file it would create the file and thus I would know that it was a location issue. jlm