Hi All
Ok, I have managed to display my Topo info from the SQlite Database in a B4XTable without crashing even if there is an Image stored in the Database.
I have a Panel in which I display the Table with the Topo Info and when I click on a Colom number the "Pic" Button becomes visible, which is supposed to show me the Image associated with that Topo Shot.
When I click on this Button, it gives me this error message:
android.database.sqlite.SQLiteBlobTooBigException: Row too big to fit into CursorWindow requiredPos=0, totalRows=1
My Code:
Any kick in the right direction please?
Ok, I have managed to display my Topo info from the SQlite Database in a B4XTable without crashing even if there is an Image stored in the Database.
I have a Panel in which I display the Table with the Topo Info and when I click on a Colom number the "Pic" Button becomes visible, which is supposed to show me the Image associated with that Topo Shot.
When I click on this Button, it gives me this error message:
android.database.sqlite.SQLiteBlobTooBigException: Row too big to fit into CursorWindow requiredPos=0, totalRows=1
My Code:
Display Image:
Sub PicList_Click
ShowScreens
Panel2.Visible=True
Try
Dim Cursor1 As Cursor = CGlobals.SQL1.ExecQuery2("SELECT Image FROM Topo WHERE No = ?", Array As String(RowId1))
Cursor1.Position = 0
Dim Buffer() As Byte = Cursor1.GetBlob("Image")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
Panel3.SetBackgroundImage(Bitmap1)
Catch
Label1.Visible=True
End Try
End Sub
Any kick in the right direction please?