cmd=new SqlCommand("select question from questions where id=1",connx); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { Byte[] rtf = new Byte[Convert.ToInt32(dr.GetBytes(0, 0, null, 0, Int32.MaxValue))]; long bytesReceived = dr.GetBytes(0, 0, rtf, 0, rtf.Length); ASCIIEncoding encoding= new ASCIIEncoding(); question.Rtf = encoding.GetString(rtf, 0, Convert.ToInt32(bytesReceived)); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)