|
-
Nov 16th, 2009, 05:53 PM
#1
Thread Starter
Lively Member
streaming a database binary file into a textbox
I have a field that is storing a text file in my database after it was converted to binary. My question is how do you read that binary file from the database, convert it back to text, and then apply it to textbox1.text? Of course, I already checked http://msdn.microsoft.com/en-us/libr...orystream.aspx , but I still can't figure out, on my own, how to accomplish this.
-
Nov 16th, 2009, 06:30 PM
#2
Re: streaming a database binary file into a textbox
-
Nov 16th, 2009, 09:59 PM
#3
Re: streaming a database binary file into a textbox
There's no need for a MemoryStream. Get the data from the database just as you would any other data. It will be returned as a Byte array. You can then use the Encoding.GetString method to convert that to a String, just as you'd use GetBytes to go the other way.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|