Problem is in select
query it's not working exception occur near textBox1.Text :
private void button1_Click(object sender, EventArgs e)
{
try
{
con.Open();
SqlDataAdapter sda = new SqlDataAdapter("select * From '"+textBox1.Text+"'", con);
sda.SelectCommand.ExecuteNonQuery();
DataTable dtable = new DataTable();
sda.Fill(dtable);
BindingSource bSource = new BindingSource();
bSource.DataSource = dtable;
dataGridView1.DataSource = bSource;
sda.Update(dtable);
con.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}