急 from 关键字附近有语法错误string sql = "select top " + Parameter[5].ToString() + " from " + TableName + " where ColumnsId=" + Parameter[1].ToString() + "and ZT=1";string sql2 = "";if (Parameter[2].ToString() == "0"){sql2 = "and IsTop=0";

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/24 04:41:21
急from关键字附近有语法错误stringsql="selecttop"+Parameter[5].ToString()+"from"+TableName+"whereColumnsId="+Para

急 from 关键字附近有语法错误string sql = "select top " + Parameter[5].ToString() + " from " + TableName + " where ColumnsId=" + Parameter[1].ToString() + "and ZT=1";string sql2 = "";if (Parameter[2].ToString() == "0"){sql2 = "and IsTop=0";
急 from 关键字附近有语法错误
string sql = "select top " + Parameter[5].ToString() + " from " + TableName + " where ColumnsId=" + Parameter[1].ToString() + "and ZT=1";
string sql2 = "";
if (Parameter[2].ToString() == "0")
{
sql2 = "and IsTop=0";
}
else
{
sql2 = "and IsTop=1";
}
sql += sql2;
string sql3 = "";
if (Parameter[3].ToString() == "0")
{
sql3 = "and IsJd=0";
}
else
{
sql3 = "and IsJd=1";
}
sql += sql3;
string sql4 = "";
if (Parameter[4].ToString() == "0")
{
sql4 = "and IsTj=0";
}
else
{
sql4 = "and IsTj=1";
}
sql += sql4;
string sql5 = "order by id desc";
sql += sql5;
db.ExecuteSQL(sql);
db.CloseConn();

急 from 关键字附近有语法错误string sql = "select top " + Parameter[5].ToString() + " from " + TableName + " where ColumnsId=" + Parameter[1].ToString() + "and ZT=1";string sql2 = "";if (Parameter[2].ToString() == "0"){sql2 = "and IsTop=0";
string sql = "select top ' " +convert.Toint32 (Parameter[5]) + "' from TableName where ZT=1 and ColumnsId='"+ Parameter[1].ToString() + " '";
对了就给分哈!