SqlDataAdapter Insert Database not working C# winform
<p>I am trying to insert data into a SQL Server database and show on DatagridView from a C# Winforms.</p>

<p>I click on the Insert button no error shows, but no data is being Insert into the database and Datagridview becomes blank.</p>

<p>I re-debug that can see data update in datagridview, but the database is not on Visual Studio Server Explorer DataBase(picture1).</p>

<p>On the other hand.I set breakpoint when click Insert Button,that jump over line 42~46.Directly to line 50.ex(picture2).</p>

<p><a href="https://i.stack.imgur.com/y23Mk.jpg" rel="nofollow noreferrer">picture1</a></p>

<p><a href="https://i.stack.imgur.com/wNXjD.jpg" rel="nofollow noreferrer">picture2</a></p>

<p><strong>Edit</strong>：
The question now is when I click insert button,datagridview have update new data.But database no insert new data.Database only two data.</p>

<p><strong>Edit2</strong>
I changed connection string AttachDbFilename.
<code>AttachDbFilename=C:\Vis\NO4\WindowsFormsApplication1\App_Dat‌​a\Database1.mdf;</code>
The value can insert database.</p>

<p>Here is the connection string:</p>

<pre><code>&lt;add name="con1" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True"
        providerName="System.Data.SqlClient" /&gt;
</code></pre>

<p>Here is the Form_load and load_grid function</p>

<pre><code>SqlConnection con;
    SqlDataAdapter da;
    DataSet ds = new DataSet();
    DataTable dt = new DataTable();
    public Form1()
    {
        InitializeComponent();
        string connectionString = ConfigurationManager.ConnectionStrings["con1"].ConnectionString;
        con = new SqlConnection(connectionString);

    }

    private void Form1_Load(object sender, EventArgs e)
    {
       load_grid();
    }
    public void load_grid()
    {
        dt.Clear();
        SqlDataAdapter da1 = new SqlDataAdapter();
        try
        {
            string sql = "SELECT * FROM profile";
            con.Open();
            da1.SelectCommand = new SqlCommand(sql, con);
            da1.Fill(ds);
            da1.Fill(dt);
            con.Close();
            dataGridView1.DataSource = dt;
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
        }
    }
</code></pre>

<p>Here is the Insert Button</p>

<pre><code> private void button1_Click(object sender, EventArgs e)
    {
        string ac = textBox1.Text;
        string bd = textBox2.Text;
        string sex = textBox2.Text;
        string sql = "INSERT INTO profile(ac,bd,sex)VALUES('" + ac + "','" + bd + "','" + sex + "')";
        try
        {
            con.Open();
            da = new SqlDataAdapter();
            da.InsertCommand = new SqlCommand(sql, con);
            da.InsertCommand.ExecuteNonQuery();
            da.Update(dt);
            MessageBox.Show("INsert success...!!");
            load_grid();
            con.Close();
        }
        catch(Exception ex)
        {
            MessageBox.Show(ex.Message);
        }
    }
</code></pre>

<p>Here is the design of the Costumer table</p>

<pre><code>CREATE TABLE [dbo].[profile] (
[Id]  INT           IDENTITY (1, 1) NOT NULL,
[ac]  NVARCHAR (50) NULL,
[bd]  NVARCHAR (50) NULL,
[sex] NVARCHAR (50) NULL,
PRIMARY KEY CLUSTERED ([Id] ASC));
</code></pre>

<p>Not sure where the issue is here.</p>