I have a database which contains binary data as system.bytes. I can convert the content with a powershell into a binary file but I didn’t get the value of the content as a readable variable:
But to put the content to a file or pass it as parameter it only says: “System.Byte”
Here it says that I’m not allow to write
So I have added “tostring”:
but the out put stays with “System.Byte”. All tries with convert oder ctype were not successful
This will give a the output “System.Byte” but not the content.
Please help to get at least the byte array write as text to a file.
Thanks for your support. But even if it’s zipped, it’s still a byte-array variable, right? I don’t have any issues to get the content out of it, but I need to get the content to pass it into a file or as a parameter for my PS1, which will convert each byte into a char (which works when I copy the content manually by my SQL console).
The following errors were encountered while processing the workflow tree:
‘VisualBasicValue’: Compiler error(s) encountered processing expression “File.WriteAllBytes(“c:\buffer\infu.txt”, DirectCast(CurrentRow.Item(2), Byte()))”.(2) : error BC30491: Expression does not produce a value.
It’s a binary file so it won’t look good when you open it as a text file. Do you know what kind of data it is? E.g. if it’s a pdf, you could test to change “.txt” to “.pdf”.
Thank you very much, I will still have to work on. When I copied the bytes from SQL I was able to convert and got a rtf file. But a RTF looks very different as to the screen I shared before.