I am getting an error when accessing data from an SQLite database.
The error is intermittent and occurs at different point in my code. The code runs correctly most of the time but occasionally fails with a disk IO error --- An error has occurred in sub:sqldata_setracepromotionnumber(Java line: 2359) android.database.sqlite.SQLiteDiskIOException:disk I/O error(code 1802) Continue no/yes
The problem appears to be OS dependant. On a Motorola G5 running Android 7.1 get the problem. On a Nexus5 phone running Android 6 it runs perfectly. It also runs correctly on an Amazon Fire. It happens running both version 6.8 and 7.3 of B4A
The problem occurs when a cursor is used, after being created by an ExecQuery command. Other database commands do not cause the issue. It occurs at different points in the code.
Typical code where the error occurs is -
<CODE>
Dim q As String
Dim EntrantId As Int
EntrantId = 44
Dim C As Cursor
q = "SELECT * FROM RaceResults INNER JOIN Entrants ON RaceResults.EntrantId = Entrants.Id WHERE Entrants.Id = " & EntrantId
C = sqlDatabase.ExecQuery(q)
If C.RowCount <> 0 Then
C.Close
Return True
Else
C.Close
Return False
End If
</CODE>
Is this an issue caused by using SQLite on Android 7? Any solutions?
Mike Parris
The error is intermittent and occurs at different point in my code. The code runs correctly most of the time but occasionally fails with a disk IO error --- An error has occurred in sub:sqldata_setracepromotionnumber(Java line: 2359) android.database.sqlite.SQLiteDiskIOException:disk I/O error(code 1802) Continue no/yes
The problem appears to be OS dependant. On a Motorola G5 running Android 7.1 get the problem. On a Nexus5 phone running Android 6 it runs perfectly. It also runs correctly on an Amazon Fire. It happens running both version 6.8 and 7.3 of B4A
The problem occurs when a cursor is used, after being created by an ExecQuery command. Other database commands do not cause the issue. It occurs at different points in the code.
Typical code where the error occurs is -
<CODE>
Dim q As String
Dim EntrantId As Int
EntrantId = 44
Dim C As Cursor
q = "SELECT * FROM RaceResults INNER JOIN Entrants ON RaceResults.EntrantId = Entrants.Id WHERE Entrants.Id = " & EntrantId
C = sqlDatabase.ExecQuery(q)
If C.RowCount <> 0 Then
C.Close
Return True
Else
C.Close
Return False
End If
</CODE>
Is this an issue caused by using SQLite on Android 7? Any solutions?
Mike Parris