hi,
i wish to know conversion of byte array to string.first i convert a string file to byte array and the insert into a sql table,after i retrieving the binary data from a table i can't convert the binary file to a string file,how can i do this.please any one help me.
Loading

Krishna GaradRank #191 · 12.8K reputationPosted Feb 6, 2011, 8:12 PM EST
krithika muthukrishnanRank #8,369 · 223 reputationPosted Feb 6, 2011, 8:17 PM EST
Suthish NairRank #92 · 22.8K reputationPosted Feb 7, 2011, 3:05 AM EST
con.Open (); SqlCommand cmd = new SqlCommand ("select file from Table1", con); byte[] buffer = (byte[]) cmd.ExecuteScalar (); con.Close(); using(FileStream fs = new FileStream(@"C:\1.txt", FileMode.Create)) { fs.Write(buffer, 0, buffer.Length); }Suthish NairRank #92 · 22.8K reputationPosted Feb 8, 2011, 8:17 AM EST