至少一个参数没有被指定值。
string s = "";
string str = "select xingming,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)
ret = 1;
}
if (ret == 1)
{
s = "";
}
else
{
s = "没有该主题";
}
return s;
至少一个参数没有被指定值。 string str = "select xingming,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)
ret = 1;
}
if (ret == 1)
{
s = "";
}
else
{
s = "没有该主题";
}
return s;
这里为什么会出现这种情况,哪位大哥能帮忙解决下,我刚学ASP,谢谢了