编写asp卡住

来源:百度知道 编辑:UC知道 时间:2024/05/16 08:01:18
大家看一下这段代码,昨天编了个类似的东西,可以运行的,今天不知道为什么,VS总指着最后那句说“=”附近有语法错误。大家看一下怎么错误了……感激不尽

string connstr = "Data Source=AKIRA;Initial Catalog=MIS;Integrated Security=True";
SqlConnection sqlconn = new SqlConnection(connstr);
sqlconn.Open();
string selectstr1="select count(*) from 登陆表 where 编号='" + TextBox1.Text.ToString() + "'";
SqlCommand sqlcom = new SqlCommand(selectstr1,sqlconn);
sqlcom.ExecuteNonQuery();

string selectstr1="select count(*) from 登陆表 where 编号='" + TextBox1.Text.ToString() + "'";
中的=应在英文状态下输入=改成
string selectstr1="select count(*) from 登陆表 where 编号='" + TextBox1.Text.ToString() + "'";
顺便提个建议就是不要用中文命名字段 可能带来一想不到的问题