else statement of Datatable
<pre><code>string sql = "select * from customer where name like '" + textBox2.Text + "%'";
string sql2 = "select * from customer";

if (textBox2.Text.Length &gt; 0)
{
    DataTable dt = CarDatabase.executeSelect(sql);
    DataTable dt2 = CarDatabase.executeSelect(sql2);

    if (dt == null)
    {
        dataGridView2.DataSource = dt2;
        MessageBox.Show("There's no result with " + textBox2.Text);
    }
    else if (dt != null)
        dataGridView2.DataSource = dt;
}
else
{
    MessageBox.Show("Please fill the textbox");
}
</code></pre>

<p>I try to do "if <code>like</code> has some result, show it in <code>DataGrid</code>". There's no problem with that. However, when <code>like</code> finds nothing in the database, the <code>DataGrid</code> stays old. However, if after searching there is no result, the <code>DataGrid</code> is empty.</p>
