Code:
private void button1_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == DialogResult.OK) { TxtPath.Text = openFileDialog1.FileName; } string connString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+TxtPath.Text+""; DataSet ds = new DataSet();