How to Convert DataRow with Byte Array data to String?

P

Paul W

How do I do this with: Option Strict On?

I know of the function System.Text.ASCIIEncoding.GetChars, but that
takes a Byte array not a DataRow. So with Option Strict On, how do I
take the byte array in my DataRow, convert it to Text and display it
on my web page without saving the info to disk inbetween?
MemoryStream? Give in and set Option Strict Off?

Thanks for any help,

Paul W (Using VB FW1.1)
 
B

Bryant Hankins

How about using something like this:

Public Function ByteArrayToString(ByVal bytArray() As Byte) As String
Dim UTF8 As New UTF8Encoding()
Return UTF8.GetString(bytArray)
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top