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.
Re: streaming a database binary file into a textbox
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.