thegremlin
Member
Hy,
I try to read a Picture from MSSQL Database and Display it to a Imageview.
This code crash the app.
But I also found a Thread with Base64 encode, but it produces the same error ?
Error occured on line: 103 (SD-ResultSet)
it looks like in the library, so a error from me...
Anyone can help me ?
Thanks
Steven
I try to read a Picture from MSSQL Database and Display it to a Imageview.
This code crash the app.
If Bildcode.Text.Length > 0 Then
Dim RS As SD_ResultSet = MSSQL.ExecQuery("SELECT bBild FROM dbo.tBild WHERE kBild='" & Bildcode.Text & "'")
Dim Buffer() As Byte =RS.GetBytes(0)
Dim InputStream1 As InputStream
Do While RS.NextRow
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As B4XBitmap = Artikelbild.bitmap
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
Artikelbild.SetBackgroundImage(Bitmap1)
Loop
End If
But I also found a Thread with Base64 encode, but it produces the same error ?
'Convert without Dir / File as request #8
Dim bitmap1 As B4XBitmap = ImageView1.Bitmap
Dim base As String = Base64EncodeDecodeImage.Base64ImageToString2(bitmap1)
ImageView2.Bitmap = Base64EncodeDecodeImage.Ba
Error occured on line: 103 (SD-ResultSet)
it looks like in the library, so a error from me...
Anyone can help me ?
Thanks
Steven