B4J Question Save blob field in file using jRDC

Fernando Melo

Member
Licensed User
Longtime User
Using jRDC with SSL is working well. I only have a caveat when I try to save a Blob into file. The following was working well.
B4X:
If result.Tag="descarregaficheiro" Then
       ProgressDialogShow2(Main.trans.GetText("Importing")&"...",False)
       For Each row() As Object In result.Rows
       Dim out AsOutputStream = File.OpenOutput(File.DirInternalCache,"out.csv",False)
       Dim In As InputStream
       Dim Buffer() As Byte
       Buffer = row(0) ' gives error here, says that can not convert a string to byte array
       In.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
       File.Copy2(In, out)
       out.CloseIn.Close

The upload code works well and I can see the csv file in database.
Can you help please.
 
Top