Private Sub B4XTable1_DataUpdated
Try
Dim sf As Object = SQL1.ExecQueryAsync("SQL","SELECT Blob FROM customers", Null)
Wait for (sf) SQL_QueryComplete(Success As Boolean, rs As ResultSet)
If Success Then
For i = 0 To B4XTable1.VisibleRowIds.Size - 1 'row(s)
Dim RowId As Long = B4XTable1.VisibleRowIds.Get(i)
If RowId > 0 Then 'View the content of the fields
...
Dim p As B4XView = BlobColumn.CellsLayouts.Get(i + 1) '+1 because the first cell is the header
Dim v As ImageView
v.Initialize("")
v.Gravity = Gravity.FILL ------------------------------- ???
p.AddView(v, 1dip, 1dip, BlobColumn.Width - 2dip, B4XTable1.RowHeight - 1dip)
rs.Position = RowId -1 'The first valid position is 0.
Dim p As B4XView = BlobColumn.CellsLayouts.Get(i + 1) '+1 because the first cell is the header
Dim b As B4XView = p.GetView(1)
Dim Buffer() As Byte = rs.GetBlob("Blob")
If Buffer <> Null Then
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim bmp As Bitmap
bmp.Initialize2(InputStream1)
InputStream1.Close
b.SetBitmap(bmp)
v.Gravity = Gravity.FILL ------------------------------------ ???
Else
b.SetBitmap(Null)
End If
Else
Exit 'The End View the content of the fields
End If
Next
End If
rs.Close
...
Catch
Log(LastException.Message)
End Try
End Sub