Topic: Problem with SQL Execute syntax.
I'm having a problem getting my SQLExecute statement correct.
I wish to delete from the database an entry I select via a combobox, Like wise I am also looking at editing an entry via combobox selection.
I have tried SQLExecute('DELETE FROM supplier WHERE sup_name='+ frmMain.ComboBox2.Text); which produces the syntax error shown in the attached image. I first of all though I should be using dbItemID SQLExecute('DELETE FROM supplier WHERE sup_name='+ frmMain.ComboBox2.dbItemID);, but that just gives me an ID of -1.
The following SQL works in DB Browser for SQLITE FROM supplier WHERE sup_name="Corsair"+"Trading".
Neither actually deletes the file in the database. Once I understand what I'm doing wrong here, I think my 'update' for editing an entry should follow the same syntax structure.
I'm too far down the track, to change my comboboxes to tablegrids, whcih of course would allow me to use the inbuilt DELETE and UPDATE records.