我正在尝试计算SomeColumn=SomeValue
. 我的代码如下所示。它什么也没显示。
using (SqlConnection conn = new SqlConnection("ConnectionString"))
{
conn.Open();
string selectStatement = "Select count(*) from Jobs where 'JobCategory=cse'";
SqlCommand cmd = new SqlCommand(selectStatement, conn);
int count = (int)cmd.ExecuteScalar();
Label1.Text = count.ToString();
conn.Close();
我应该采取什么步骤?