This code gives warnings but no errors and no file on the SD card. Would you tell me what's incorrect please.
Thanks for all pointers.
B4X:
Sub prnt2
Dim Cursor3 As Cursor = SQL1.ExecQuery("select image FROM MyTable WHERE name = name")
Cursor3.Position = pos
Dim Bmp As Bitmap ' I added this
If Cursor3.RowCount > pos Then
Dim binImage() As Byte, Flux As InputStream
binImage = Cursor3.GetBlob("Image")
Flux.InitializeFromBytesArray(binImage, 0, binImage.Length)
Bmp.Initialize2(Flux)
Flux.Close
End If
Cursor3.Close
Return Bmp ' Warning Object converted to String
Dim out As OutputStream = File.OpenOutput(File.DirRootExternal, "0.png" , True) ' Unreachable code
out.WriteBytes(binImage, 0, binImage.Length)
out.Cl
End Sub