using(SqlCommand cmd = new SqlCommand("SELECT BinaryData FROM FileUpload", connection))
{
byte[] file = (byte)cmd.ExexcuteScalar();
MemoryStream ms = new MemoryStream(file, true);
ms.Write(file, 0, file.Length);
using(StreamReader reader = new StreamReader(ms))
{
textbox.Text = reader.ReadToEnd();
}
}