SQL 语句的结束位置缺少分号 (;)。

来源:百度知道 编辑:UC知道 时间:2024/05/27 04:31:00
thisCMD3.CommandText="Insert into ly2([hf]) values('"+this.rsps.Text+"') where id='"+this.no.Text+"'";
thisCMD3.ExecuteNonQuery();
上面的语句错在哪里啊???追20分

thisCMD3.CommandText="Insert into ly2([hf]) values('"+this.rsps.Text+"') where id='"+this.no.Text+"'";

ly2([hf]) 不需要[]
id是整形,则不需要'
还有insert要where干吗?

把你debug的错误信息贴出来
这样看不出来