列“zhuti ”不属于表 Table。
public string selecdzt()
{
string s = "";
string str = "select yonghuming,dianhua,zhuti,neirong from youke";
OleDbConnection cn = new OleDbConnection(System.Configuration.ConfigurationManager.AppSettings["SQLConnString"].ToString());
OleDbDataAdapter da = new OleDbDataAdapter(str, cn);
DataSet ds = new DataSet();
da.Fill(ds);
int ret = 0;
for (int i = 0; i <= youkexinxi . count() - 1; i++)
{
string s1 = ds.Tables[0].Rows[i]["zhuti "].ToString();
if (zhuti == s1.Trim ())
ret = 1;
}
if (ret == 1)
{
s = "主题存在";
}
else
{
s = "没有该主题";
}
return s;
}
列“zhuti ”不属于表 Table。 这是什么原因呢,哪位大哥能帮我解答下呢?
{
string s = "";
string str = "select yonghuming,dianhua,zhuti,neirong from youke";
OleDbConnection cn = new OleDbConnection(System.Configuration.ConfigurationManager.AppSettings["SQLConnString"].ToString());
OleDbDataAdapter da = new OleDbDataAdapter(str, cn);
DataSet ds = new DataSet();
da.Fill(ds);
int ret = 0;
for (int i = 0; i <= youkexinxi . count() - 1; i++)
{
string s1 = ds.Tables[0].Rows[i]["zhuti "].ToString();
if (zhuti == s1.Trim ())
ret = 1;
}
if (ret == 1)
{
s = "主题存在";
}
else
{
s = "没有该主题";
}
return s;
}