http://www.b4x.com/android/help/sql.html
SQL.ExecNonQuery("PRAGMA integrity_check(100)")
as does
SQL.ExecNonQuery("PRAGMA integrity_check(1)")
as does
SQL.ExecNonQuery("PRAGMA integrity_check")
android.database.sqlite.SQLiteException: unknown error: Queries can be performed using SQLiteDatabase query or rawQuery methods only.
Dim SQLReader As Cursor
Dim i As Int
SQLReader = SQL1.ExecQuery("PRAGMA integrity_check(100)")
If SQLReader <> Null Then
lstvCAT.Clear
For i = 0 To SQLReader.RowCount - 1
SQLReader.Position = i
lstv.AddTwoLines2(SQLReader.GetString("Code"),SQLReader.GetString("Name"),SQLReader.GetString("id"))
Next
SQLReader.Close
End If
http://www.sqlite.org/pragma.html#pragma_integrity_check
lstv.AddTwoLines2(SQLReader.GetString("Code"),SQLReader.GetString("Name"),SQLReader.GetString("id"))
Cursor1=SQL.ExecQuery("integrity_check")
Cursor1.Position = 0
If Cursor1.RowCount > 0 Then
.... errors
Dim kk As Cursor
kk= General.ExecQuery("PRAGMA integrity_check(100)")
kk.Position=0
Msgbox(kk.GetString2(0),"test") //returns ok
Msgbox(kk.GetColumnName(0),"test") //returns integrity_check
Msgbox(kk.ColumnCount,"test") //returns 1
Msgbox(kk.RowCount,"test") //returns 1 , if returns > 1 there are errors
Dim kk As Cursor
kk= General.GetCursor("PRAGMA integrity_check(100)")
If kk.RowCount > 1 Then
For i = 0 To kk.RowCount -1
kk.Position=i
Msgbox(kk.GetString2(0),"error")
Next
End If
LOL! so dont use this specific pragma on android there is no reason!
btw maybe is something with your SQLite database version (aka the .db) ?
Sqllite Administrator
http://sqliteadmin.orbmu2k.de/