C#连接SqlServer增加数据

提示我where附近有语法错误,想要实现的是通过Session["Uname"]的值绑定到相应的记录,为里边的字段添加值,希望能有位大神教教我怎么写

img

insert into语句写错了,还有看看label2.text内容是什么,是不是有特殊的标点符号。

你那语法本来就有问题啊,SQL语法应该是 insert into select xxx from tablename where xxx
你那代码里写的 insert into values了都,后面就没有条件了,sql语法需要改一下
建议你先了解一下 insert语句,和insert into select语法

你这代码问题太多了
1.update和delete才有where条件,insert没有where条件
2.你到是去获取Session["Uname"]的值呀,为什么从文本框里取值
3.前面values都已经用了参数化传值,为什么where要做字符串拼接