Binding Source get Identity
<p>Given the code below, if there is no row in my sqltable then <code>textbox1.Text</code> is 0; what I would like to do is to update the table from <code>button_click</code> so that my new <code>Id</code> value is generated and retrieved automatically - this is necessary for relational tables. </p>

<p>How can I make this work?</p>

<pre><code>Form_Load
{
    SqlConnection con=new SqlConnection(connectionstring);
    SqlDataAdapter adap=new SqlDataAdapter(selectcommand);
    DataSet rec=new Dataset();
    adap.Fill(Rec);
    BindingSource bs=new BindingSource(rec,"TableName");

    TextBox1.DataBindings.Add("Text",bs,"Id");//Id is my primarykey
    TextBox2.DataBindings.Add("Text",bs,"Name");

    bs.AddNew();
}


button_click
{
    SqlCommandBuilder cb=new SqlCommandBuilder(adap);
    adap.update(rec.Tables["TableName"]);
}
</code></pre>
