B4J Question Save blob field in file using jRDC

Fernando Melo

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.
If result.Tag="descarregaficheiro" Then
       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)

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