@Mike W For UPDATE I want to be able to change a single record identified by the ID, but the ID would be cited by reference to a TextField which contains it -
UPDATE [tablename] [field names] WHERE [ID = TF.text]
For DELETE I want to delete the entire row referencing the record in the same way as above.
What I find confusing is where to put the apostrophes and inverted commas.
Also, how important is the db.Commit statement ??
What apostrophes and inverted commas?
A simple UPDATE example might be:
update mytable set myfield1=33, myfield2=44 where id=27
If the id is in a textfield, you might build an sql string as in:
Dim sql as string, dbh as sqlitedatabase
sql = "update mytable set myfield1=33, myfield2=44 where id=" + clong (mytxtfield.text)
(I've omitted code to open the db and check for errors.)
This assumes that myfield is guaranteed to only contain a number, you may wish to read the value from the field and check it before generating the sql. If the values I've used (33 and 44) come from elsewhere then modify the sql generating statement as appropriate.
You don't need the commit unless you have started a transaction. In SQLite, all single sql calls like the above are their own transaction.