0

I am trying to pull a blob from a mysql table and display it on an mvc view page. When I try to access it, it is just coming up as System.byte[]. I tried adding tostring(), but get the same results. I also tried BitConverter.ToString, but then I get what appears to be a hex string (43-6F-6E-66.....).

How do I get plain text from that?

thanks

1 Answer 1

1

I was able to get this working by using Encoding.ASCII.GetString(myBlobField)

Thanks

Sign up to request clarification or add additional context in comments.

2 Comments

You wouldn't have needed that if you had mapped it as a string property / StringClob type
Do you mean by just adding type="StringClob" to my mapping xml file?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.