How to Convert DataRow with Byte Array data to String?

Discussion in 'ASP .Net' started by Paul W, Aug 6, 2004.

  1. Paul W

    Paul W Guest

    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)
     
    Paul W, Aug 6, 2004
    #1
    1. Advertising

  2. 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


    --
    Hope this helps,
    Bryant Hankins
    Numinet Systems Inc.
    http://www.numinet.com



    "Paul W" <> wrote in message
    news:...
    > 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)
     
    Bryant Hankins, Aug 6, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kirby
    Replies:
    3
    Views:
    667
    Kirby
    Oct 8, 2004
  2. Shane Wealti

    convert byte[] to Byte[]

    Shane Wealti, Jun 13, 2005, in forum: Java
    Replies:
    5
    Views:
    42,457
    Brzezi
    Jun 13, 2005
  3. Replies:
    20
    Views:
    9,893
    licebmi
    Sep 7, 2009
  4. Polaris431
    Replies:
    8
    Views:
    780
    SM Ryan
    Dec 4, 2006
  5. Paulo
    Replies:
    2
    Views:
    5,920
Loading...

Share This Page