Search

You searched for the word(s): userid:629263

Matching Posts

  • Re: export database records to tab delimited file. asp.net/vb

    //You should get data into datatable DataTable dt=new DataTable; // Write data in datatable to a text file string path = Server.MapPath("")+"\\files\\temp.txt"; StreamWriter sw = new StreamWriter(path,false); foreach(DataRow dr in dt.Rows) { string line=""; foreach(DataColumn dc in dt.Columns) { line+=dr[dc.Name].ToString()+"\t"; } sw.WriteLine(line); } sw.Close(); //Read the file to a byte array Stream s = File.OpenRead(path); Byte[] buffer = new Byte[s.Length]; s.Read(buffer, 0, (Int32) s.Length
    Posted to Getting Started (Forum) by altunbay on 10/19/2005
Page 1 of 1 (1 items)