title: getting error when trying to insert new row in dataset table
body: <p>I am getting error at where datarow object is created. </p>
  
  <blockquote>
    <p>Object reference not set to an instance of an object</p>
  </blockquote>
  
  <pre><code>protected void Button2_Click(object sender, EventArgs e)
      {
          SqlConnection con2 = new SqlConnection("Data Source=AMIT-PC\\SQLEXPRESS;Initial Catalog=Amit;Integrated Security=true");
          con2.Open();
          SqlCommand cmd2 = new SqlCommand("Select * from  hotel.country", con2);
  
          SqlDataAdapter da2 = new SqlDataAdapter(cmd2);
          SqlCommandBuilder sb = new SqlCommandBuilder(da2);
          DataSet ds2 = new DataSet();
          da2.Fill(ds2);
         /* GridView2.DataSource = ds2;
          GridView2.DataBind();*/
  
          DataRow dr = ds2.Tables["hotel.country"].NewRow();
          dr[ds2.Tables[TextBox1.Text].Columns[0].ColumnName] = TextBox2.Text;
          dr[ds2.Tables[TextBox1.Text].Columns[1].ColumnName] = TextBox3.Text;
          da2.Update(ds2);
          GridView1.DataBind();
  
      }
  </code></pre>