Getting BLOB data field from database into a standard textbox

Posted on 2006-03-20
Last Modified: 2006-11-18
I have two types of BLOB in my database, image and text. I can save and retrieve images fine. I can store text in my database but have no idea how to get it into a textbox.

I can get a BLOB object from my MS Access 2000 database into a picturebox, how do i get it into a textbox? I have this code for the picturebox

'if its an image then do this      
     Dim ByteArray() As Byte
     'assign BLOB from db to bytearray
     ByteArray = DirectCast((myDataTable.Rows(0)(0)), Byte())
     'assign bytearray to memorystream
     Dim memstrm As New MemoryStream(ByteArray)
     'assign memorystream to picturebox
     PictureBox1.Image = Image.FromStream(memstrm)
'if its text then do this
                'textbox1.Text = ????

any help much appreciated
Question by:ab2ae
    LVL 10

    Assisted Solution

    maybe something like this
    LVL 96

    Accepted Solution

    Actually, System.Text.Encoding.UTF8.GetString(byteArray) would probably do the job more efficiently.


    Author Comment

    excellent work experts, thanks!!

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now