Link to home
Start Free TrialLog in
Avatar of ab2ae
ab2ae

asked on

Getting BLOB data field from database into a standard textbox

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
SOLUTION
Avatar of bchoor
bchoor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ab2ae
ab2ae

ASKER

excellent work experts, thanks!!