in some cases, when you debug a SQL is good to take a SQL Full that is:
not: insert into table(campo1,campo2,campo3) values (?,?,?)
instead of
insert into table(campo1, campo2, campo3) values ('mivalor1','mivalor2', 'mivalor3')
i attach this esasy code for replace a ? by val of list)
not: insert into table(campo1,campo2,campo3) values (?,?,?)
instead of
insert into table(campo1, campo2, campo3) values ('mivalor1','mivalor2', 'mivalor3')
i attach this esasy code for replace a ? by val of list)
B4X:
public Sub DecodeSql(TheSql As String, Ar As List) As String
Dim Posicion As Long = 0
Dim Posicion2 As Int
Dim NewSql As String
Dim N As Long
For n = 0 To Ar.Size -1
Posicion2= TheSql.IndexOf2( "?",Posicion)
NewSql = NewSql & TheSql.SubString2(Posicion, Posicion2) & "'" & Ar.Get(n) & "'"
Posicion = Posicion2+1
Next
NewSql= NewSql & TheSql.SubString(Posicion)
Log(NewSql)
Return NewSql
End Sub