第 1 行: 'PublishArticle' 附近有语法错误。请各位帮小弟看看,谢谢各位了
本帖最后由 kangshaofei 于 2013-09-24 10:20:17 编辑
如下错误提示:,这个是分页取数据,但是出现错误,我实在看不出,请大家帮帮我,谢谢了
下面是我部分代码:
web层代码:
int RecordCount = 0;
int PageSize = 10;//每页显示的条数
int PageIndex = 1;//当前页数
public DataTable GetArticle(int userId)
{
Article articleBll = new Article();
string strUrl = string.Format("BlogDefault.aspx?userId={0}&", userId);
DataTable dt = articleBll.StructureArticleListDefault(userId, PageSize, PageIndex, out RecordCount);
return dt;
}
BLL代码:
/// <summary>
/// 构造首页博文列表
/// </summary>
/// <param name="userId"></param>
/// <param name="pageSize"></param>
/// <param name="pageIndex"></param>
/// <param name="recordCount"></param>
/// <returns></returns>
public DataTable StructureArticleListDefault(int userId,int pageSize,int pageIndex,out int recordCount)
{
string strWhere = "PublishArticle.IsShow = 1 and PublishArticle.ArticleFrom < 2 and ";
strWhere += "PublishArticle.UserId = "+userId;
DataTable dt = dal.GetDefaultArticleData(pageSize, pageIndex, out recordCount,strWhere);
return dt;
}
DAL代码:
/// <summary>
/// 分页获取首页博文数据表
/// </summary>
/// <param name="PageSize"></param>
/// <param name="PageIndex"></param>
/// <param name="RecordCount"></param>
/// <param name="strWhere"></param>
&nbs