another problem
finally I made it, deleting the db and recreating copying from assets
but now, I'm experiencing this problem:
android.database.sqlite.SQLiteException: bind or column index out of range: handle 0x25c268
the code in question is:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim lblCliente As Label
Dim spnrClienteId As Spinner
Dim lstSerials As ListView
Dim WebView1 As WebView
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
'If File.Delete(File.DirInternal,"elenco.db") = True Then
If File.Exists(File.DirInternal,"elenco.db") = False Then
Msgbox("DB Inesistente!","Attenzione")
File.Copy(File.DirAssets,"elenco.db",File.DirInternal,"elenco.db")
End If
' End If
If SQL1.IsInitialized = False Then
SQL1.Initialize(File.DirInternal, "elenco.db", False)
End If
End If
Activity.LoadLayout("elenco")
'Fill the id spinner (aka combo box).
' DBUtils.ExecuteSpinner(SQL1, "select id || ' ' || nominativo from clienti", Null, 0, spnrClienteId)
DBUtils.ExecuteSpinner(SQL1, "select id from clienti", Null, 0, spnrClienteId)
spnrClienteIdItem_Click(0, spnrClienteId.GetItem(0))
'ExportToJSON
'ShowTableInWebView
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub spnrClienteIdItem_Click (Position As Int, Value As Object)
FindSerials(Value)
End Sub
Sub FindSerials(ClienteId As String)
'Note that we use SQLite concatenation operator to add 'Grade: ' before each grade.
DBUtils.ExecuteListView(SQL1, "SELECT licenza, 'Seriale: ' || seriale, ' Expiration:' || expiration FROM clienti WHERE id = 1", _
Array As String(ClienteId), 0, lstSerials, True)
End Sub
the istruction that raises the error is:
DBUtils.ExecuteListView(SQL1, "SELECT licenza, 'Seriale: ' || seriale, ' Expiration:' || expiration FROM clienti WHERE id = 1", _
Array As String(ClienteId), 0, lstSerials, True)
I don't understand why!!!!