Hello everyone, I state that I am not good in sqlite, I'm making a program with 33 fields edittex and be able to save and recall all in a simple way, but when I go to save tells me this error: sqliteexception: datatype mismatch: INSERT INTO table VALUES
see photo,
someone is willing to help me?
other question .... if some fields are empty at the time of the rescue, the database must be in error '.
I trust in you
part of the code
see photo,
someone is willing to help me?
other question .... if some fields are empty at the time of the rescue, the database must be in error '.
I trust in you
part of the code
B4X:
Sub btnnuovo_Click
If txtlocale.Text="" Then
Msgbox("Devi prima inserire un locale sulla casella di testo","AVVISO")
Else
Dim NewID As Int
Try
NewID = SQL1.ExecQuerySingleResult("SELECT max(id) FROM tabella ") + 1
Catch
NewID = 1
End Try
SQL1.ExecNonQuery("INSERT INTO tabella VALUES('" & NewID & "','" & txtlocale.text & "','" & txtuser.text & "','"& txtpassword.text & "','" & txtpiattaforma.Text &"','" & txtincasso.Text &"','"& txtdata.Text & "','" & txtora.Text & "','"& txtfido.Text & "','" & txtpercentuale.Text & "','" & txtcaricati.Text & "','" & txtresiduo.Text & "','"& txtconsumato.Text & "','" & txtquotanoi.Text & "','" & txtquotalocale.Text & "','" & txtrimanenza.Text & "','" & txtstorico.Text & "','" & txtweb.Text & "','" & txtesattore.Text & "','" & txtnotespesevarie.Text & "','" & txtspesevarie.Text & "','" & txtspesecarburante.Text & "','" & txtaccontoagente.Text & "','" & txtaccontolocale.Text & "','" & txtnotespeselocale.Text & "','" & txtspeselocale.Text & "','" & txtdareagente.Text & "','" & txtdarelocale.Text & "','" & txtnote.Text & "','" & txtpercentualeagente.Text & "','" & txtquotaagente.Text & "','" & txtstoricoquotalocale.Text & "','" & txtstoricoincassi.Text & "')")
Msgbox("Locale aggiunto al database","MEMORIZZATO")
End If
'btnleggi_Click
End Sub