[?] Connecting SQLite Tables with Lazarus lazarus / 16-Databases ---------------------------------------------------------------------- Picard · 2019-06-12 19:47 I've been trying to follow the Pascal and SQLite video tutorials on YouTube to build a database and connect it with Lazarus; however, when I get to the point of connecting individual tables to Lazarus there are no instructions and I don't know what to do.  The database that I created has about 7 tables and I need to connect to each one of them separately and access their data.  How can I do that?  Is the problem in the way I created the database or is it in the Pascal Manager utility's connection property?  Here are the videos that have helped me so far. SQLite Tutorial 5 : How to Import CSV or Excel file into SQLite database https://www.youtube.com/watch?v=ebYMbi_0Www Lazarus SQL database video tutorial https://www.youtube.com/watch?v=pq2oCiJePHo&t=98s ---------------------------------------------------------------------- JanRoza · 2019-06-12 21:26 If you want to do it in a neat way: first create a datamodule, and on that datamodule form create a connection (TSQLiteConnection) to the database and a transaction (TSQLTransaction). Now for each table from that database create a query (TSQLQuery). In the query select the connection to the database as the database property and in the SQL property click on the button behind it and fill in a SQL select statement like 'SELECT * FROM '. That's it. ---------------------------------------------------------------------- Picard · 2019-06-14 00:59 So in order to connect the database that I made with SQLite, I should use TSQLiteConnection, SQLTransaction and TSQLQuery.  Then in the TSQLQuery I use 'SELECT * FROM '.  Is this what you are suggesting?  What does the "T" in TSQLite mean? ---------------------------------------------------------------------- JanRoza · 2019-06-14 12:02 Yes, that's what I mean. ---------------------------------------------------------------------- howardpc · 2019-06-14 12:59 Quote from: Picard on June 14, 2019, 02:59:43 amWhat does the "T" in TSQLite mean?The widespread convention of naming class types beginning with a capital "T" indicates that the word is a Type name, as opposed to the name of a variable or other identifier. Presumably the T is short for Type. ---------------------------------------------------------------------- egsuh · 2019-06-17 12:34 Simpler way is to use TSqlite3DataSet. You assign the sqlite file name,  and then you may either assign table name or write the SQL statement (for example, "select * from table1"). Both will give you the same result. Then you can connect it to any visual control like TDBGrid, etc. through datasource.