c# 中的错误语法不正确

error Incorrect syntax near in c#

此语句给出以下错误:

An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll Additional information: Incorrect syntax near ','.

注:我的table有22个字段 感谢您的帮助

con.ConnectionString = @"Data Source =.\MYSQL; Initial Catalog = db_info; Integrated Security = True";
con.Open();
/SqlCommand com = new SqlCommand("insert into tbl_tarifmoshtari values(@p1,@p2,@p3,@p4,@p5,@p6,@p7,@p8,@p9,@p10,@p11,@p12,@p13,@p14,@p15,@p16,,,,,,,)", con);
SqlCommand com1 = new SqlCommand();

com1.Parameters.AddWithValue("@p1", Convert.ToInt32(txbox_shomaremoshtari.Text));
com1.Parameters.AddWithValue("@p2", cmbo_jensiyat.Text);
com1.Parameters.AddWithValue("@p3", txbox_nam.Text);
com1.Parameters.AddWithValue("@p4", txbox_famil.Text);
com1.Parameters.AddWithValue("@p5", txbox_pedar.Text);
com1.Parameters.AddWithValue("@p6", txbox_tarikhtavalod.Text);
com1.Parameters.AddWithValue("@p7", txbox_shomareshenasname.Text);
com1.Parameters.AddWithValue("@p8", txbox_codmeli.Text);
com1.Parameters.AddWithValue("@p9", txbox_mahaltavalod.Text);
com1.Parameters.AddWithValue("@p10", txbox_serishenasname.Text);
com1.Parameters.AddWithValue("@p11", txbox_serialshenasname.Text);
com1.Parameters.AddWithValue("@p12", txbox_adresmanzel.Text);
com1.Parameters.AddWithValue("@p13", txbox_codpostimanzel.Text);
com1.Parameters.AddWithValue("@p14", Convert.ToInt32(txbox_telephonmanzel.Text));
com1.Parameters.AddWithValue("@p15", Convert.ToInt32(txbox_mobil.Text));
com1.Parameters.AddWithValue("@p16", txbox_email.Text);
com1.ExecuteNonQuery();

如果您的 table 有 23 列,而您不想插入所有 23 列,请在 Insert 中提及所需的列列表。不需要加逗号

Insert into tbl_tarifmoshtari 
(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16)
values
(@p1,@p2,@p3,@p4,@p5,@p6,@p7,@p8,@p9,@p10,@p11,@p12,@p13,@p14,@p15,@p16)