I have a problem joining the DELETE-UPDATE-WHERE-AND operators receiving an error as in the picture
Ho un problema unendo gli operatori UPDATE-WHERE-AND. I do not receive any errors, but the database is not updated (I also checked by extracting the .db file on the pc).
Suggestions?
B4X:
Dim Query As String
Query = "UPDATE Rifornimento SET Data = ?, Chilometri = ?, Importo = ?, PrezzoLitro = ?, LitriErogati = ?, Note = ?, Immagine = ? WHERE Targa = 'targaId' AND Chilometri = 'chilometriId' "
SQL1.ExecQuery2(Query, Array As String(txtDataMod.Text, txtKmMod.Text, txtImportoMod.Text,txtPrezzoMod.Text,litririf, txtNoteMod.Text,nomeimg))
The syntax you posted is correct, unless you have a stray space somewhere. I am sure you verified the columns spelling is exact. Sometimes in DELETE you may want to use only one column in the WHERE clause to test to minimize the potential error, then use the other column to test and see which one is the culprit. Of course, you use copies of the database. to test with. If you cannot figure it out and you can post a little project to reproduce it, I am sure many of the forum members would be more than willing to help you.