这是保存插入文本框中值的代码,可是每一次保存以后都会有好多条相同的记录,这是为什么
 try
        {
            //    SqlConnection con = new SqlConnection("server=(Local);user id=sa;pwd=;DataBase=cgb");            SqlConnection con = new SqlConnection("Data Source=(local);Initial Catalog=company;Integrated Security=True;Pooling=False");
            con.Open();
            string InsertSql1 = "Insert Into cgbt(cgrq,ddh,ck,cglx,htbh,gys,gysdz,lxdh,jhr,jhfs,jhdd,jhrq,sfkp,fplb,fkyd,ydzffs,jkfs,jbr,jbbm,zje,bz)values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + DropDownList1.Text + "','" + DropDownList2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox23.Text + "','" + TextBox24.Text + "','" + TextBox5.Text + "','" + DropDownList3.Text + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + DropDownList4.Text + "','" + DropDownList5.Text + "','" + TextBox12.Text + "','" + DropDownList6.Text + "','" + DropDownList7.Text + "','" + TextBox8.Text + "','" + TextBox9.Text + "','" + TextBox10.Text + "','" + TextBox11.Text + "')";
            string InsertSql2 = "Insert Into spb(hpbh,hpmc,gg,dw,pp,cd,sl,dj,je,shuilv)values('" + TextBox13.Text + "','" + TextBox14.Text + "','" + TextBox15.Text + "','" + TextBox16.Text + "','" + TextBox17.Text + "','" + TextBox18.Text + "','" + TextBox19.Text + "','" + TextBox20.Text + "','" + TextBox21.Text + "','" + TextBox22.Text + " ')";
            SqlCommand com1 = new SqlCommand(InsertSql1, con);
            SqlCommand com2 = new SqlCommand(InsertSql2, con);            com1.ExecuteNonQuery();
            com2.ExecuteNonQuery();
            SqlDataAdapter ada1 = new SqlDataAdapter("Select * From cgb,spb", con);