[英]SSRS Retrieve BLOB from Oracle Server to text in SSRS Report
I am trying to convert a BLOB from Oracle server to text in SSRS. 我正在尝试将BLOB从Oracle服务器转换为SSRS中的文本。
I have tried: 我努力了:
Convert.ToBase64String(Fields!BLOB.Value)
And I have also tried: 我也尝试过:
System.Convert.ToBase64String(Fields!BLOB.Value)
But it converts it to UTF-8 encoding and I get these variables VHaw5nl=
. 但是它将其转换为UTF-8编码,我得到了这些变量VHaw5nl=
。
I've also tried writing the following code: 我也尝试编写以下代码:
Public Function Decoding(ByVal s As String) As String
Dim rntString As String
rntString = Encoding.UTF8.GetString(s)
End Function
And then putting this in my expression: 然后将其放在我的表情中:
Code.Decoding(Fields!BLOB.Value)
But I am receiving an error after that. 但是那之后我收到一个错误。
How can I solve this problem? 我怎么解决这个问题?
try: var myBytes = (byte[])dr["columnname"]; 试试:var myBytes =(byte [])dr [“ columnname”]; dr is the data reader. dr是数据读取器。 Once you get it into an array, you can use Encode to convert it to a string format. 将其放入数组后,可以使用Encode将其转换为字符串格式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.