Hi,
I try to read a BLOB field from a local database. For this use the following code:
but I get an error: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0 at line: Buffer = Cursor1.GetBlob("POZA").
Cursor1.ColumnCount and Cursor1.RowCount return correct value!
Can please someone tell me what am I doing wrong?
:sign0188:
I try to read a BLOB field from a local database. For this use the following code:
B4X:
If mySQL.IsInitialized = False Then
mySQL.Initialize(File.DirInternal, "database.db3", False)
End If
Dim Cursor1 As Cursor
Cursor1 = mySQL.ExecQuery("SELECT POZA FROM POZE WHERE id = (SELECT MIN(id) FROM poze)")
Cursor1.Position = 0
Dim Buffer() As Byte
Buffer = Cursor1.GetBlob("POZA")
Cursor1.Close()
Cursor1.ColumnCount and Cursor1.RowCount return correct value!
Can please someone tell me what am I doing wrong?
:sign0188: