string a=TextBox1.Text.ToString();
string scalarQueryStr="select count(*) from GovFile where title='+trim(a)'";
SqlCommand scalarCommand=new SqlCommand(scalarQueryStr,nwConn);
scalarCommand.Connection.Open();
int count=(int)scalarCommand.ExecuteScalar();
scalarCommand.Connection.Close();
Label1.Text="符合要求的发文有"+count+"个";
nwConn.Close();