i have some problems simil to this:
that is:
android.database.sqlite.sqlitediskioException: disk i/o error (code 522 sqlite_ioerr_short_read
the cause a read is by:
- No memory: https://stackoverflow.com/questions...kioexception-code-522-sqlite-ioerr-short-read
- No close cursor : https://www.b4x.com/android/forum/threads/sqlite-disk-io-error-1034.43530/
but i thing to do something like this:
the question is: is good idea open - execute - and close database
or is better make open alway the database (now, i do this: always open. )
And other cuestion: is necesary to close the cursor if the var are definid into a sub (not in a public module)
(i use 3 database in my system), beacuse any database are download from dropbox, other as for job and to insert and send by dropbox, and other for control of device.)
that is:
android.database.sqlite.sqlitediskioException: disk i/o error (code 522 sqlite_ioerr_short_read
the cause a read is by:
- No memory: https://stackoverflow.com/questions...kioexception-code-522-sqlite-ioerr-short-read
- No close cursor : https://www.b4x.com/android/forum/threads/sqlite-disk-io-error-1034.43530/
but i thing to do something like this:
B4X:
PUBLIC Sub SqLLocal_ExecNonQuery( ComandoSql As String)
Try
OpenDBLocal(False)
SqLLocal.ExecNonQuery (ComandoSql)
SqLLocal.Close
Catch
Log(LastException)
End Try
End Sub
PUBLIC Sub SqLLocal_ExecNonQuery2( ComandoSql As String,Args As List )
Try
OpenDBLocal(False)
SqLLocal.ExecNonQuery2 (ComandoSql,Args )
SqLLocal.close
Catch
Log(LastException)
End Try
End Sub
public Sub GetSqlLocal As SQL
OpenDBLocal(False)
Return SqLLocal 'this is a public var
End Sub
the question is: is good idea open - execute - and close database
or is better make open alway the database (now, i do this: always open. )
And other cuestion: is necesary to close the cursor if the var are definid into a sub (not in a public module)
(i use 3 database in my system), beacuse any database are download from dropbox, other as for job and to insert and send by dropbox, and other for control of device.)
Last edited: