2
Reply

How to save database output to a file in D drive using c#

Bidyut Chandra

Bidyut Chandra

Nov 5 2014 5:42 AM
855
i want to display or save the output in a particular folder/file. But can't understand how to do.
Here's the code where i blocked. Help me.
private void button1_Click(object sender, EventArgs e)
        {
                              
            sql = "select * from booking where b_no='" + textBox1.Text + "'";
            ds = new DataSet();
            ds = DataGetSet.GetData(sql);
            for (i = 0; i < ds.Tables[0].Rows.Count; i++)
             {
                label3.Text = ds.Tables[0].Rows[i][1].ToString();
                label4.Text = ds.Tables[0].Rows[i][2].ToString();
                label5.Text = ds.Tables[0].Rows[i][3].ToString();
             }
        }

Answers (2)