Very first attempt at connecting to a new SQLite db from Lazarus.
As part of the learning process I thought I would just use someone else's example code and change the db and table names to see if I could make sense of the Lazarus->db connection process.
I used a sample program I found somewhere on this site and changed the database name to my new DB and also changed the table name [but the name was wrong] and of course I got an error:
"Project project1 raised exception class 'EDatabaseError' with message: no such table: CombinedMasterMusic"
That was the name of the table in my original MS Access db but in the newly created SQLite db it is 'MasterList' Ok that is exactly the error I should have received. So far so good as Lazarus is operating exactly as I expected it to do when I made this error.
So I went to the section of coded in 'unit1.lfm' and changed the table name as such:
object SQLQuery1: TSQLQuery
FieldDefs = <>
Database = SQLite3Connection1
Transaction = SQLTransaction1
SQL.Strings = (
'Select * from MasterList'
)
Now when I run the code, I don't get any errors after I hit Run but as soon as I hit the button which should launch the code above I get EXACTLY the same error with the same wrong table message. I searched the entire project to see if I had used that same wrong table name elsewhere, even though I thought I had only used it in the code above. I cannot find any reference to 'CombinedMasterMusic'
Just in case, I closed Lazarus and restarted it but the same error with the same wrong table name appeared.
EDIT: Re-booting the laptop fixed this. I trust this will not be a required fix for weird database issues.