gpt4 book ai didi

c# - 尝试执行代码时收到错误消息

转载 作者:太空宇宙 更新时间:2023-11-03 19:09:58 25 4
gpt4 key购买 nike

<分区>

con.Open();
string qry="insert into reg1 values ('"+txtname.Text+"','"+txtaddress.Text+"','"+txtpin.Text+"','"+txtage.Text+"','"+txtgender.Text+"','"+txtcourse.Text+"','"+txtcollege.Text+"','"+txtfname.Text+"','"+txtoccup.Text+"','"+txtmname.Text+"','"+txtskills.Text+"','"+txtmobile.Text+"','"+txtemail.Text+"')";
SqlCommand cmd = new SqlCommand(qry, con);
cmd.ExecuteNonQuery();
con.Close();

当我尝试执行此代码时收到以下错误消息:

Column name or number of supplied values does not match table definition.

谁能帮我找出错误?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com