string selecsql="select count(*) from twhd where title="+TextBox1.Text.ToCharArray();
string connstr=@"Data Source=WWW-0C1C21770A3\SQLEXPRESS;Initial Catalog=xtez;Integrated Security=True";
SqlConnection conn=new SqlConnection(connstr);
conn.Open();
SqlCommand cmd1=new SqlCommand (selecsql,conn);
int count= Convert.ToInt32(cmd1.ExecuteScalar());
当执行到最后一行的时候就出现了上面说的错误,请高人指教一下,我就这么多分了全部拿出来
莫回无