屠龙 - 2008-6-2 15:40:00
自定义频道 查看所有评论 报错。
报错原因:无法找到对应的表。
解决办法如下:
修改的文件地址:
NetCMS V1.5_Src\NetCMS.DALSQLServer\News.cs 280行---297 行
public IDataReader getClassInfo(string ClassID, int ChID)
{
string Sql = string.Empty;
SqlParameter[] param = new SqlParameter[1];
if (ChID != 0)
{
param[0] = new SqlParameter("@ClassID", SqlDbType.Int, 4);
param[0].Value = int.Parse(ClassID);
Sql = "Select id,SavePath,FileName From[" + Pre + "chanelclass] Where [id]=@ClassID";
}
else
{
param[0] = new SqlParameter("@ClassID", SqlDbType.NVarChar, 12);
param[0].Value = ClassID;
Sql = "Select ClassID,SavePath,SaveClassframe From [" + Pre + "news_class] Where [ClassID]=@ClassID";
}
return DbHelper.ExecuteReader(CommandType.Text, Sql, param);
}
改成
public IDataReader getClassInfo(string ClassID, int ChID)
{
string Sql = string.Empty;
SqlParameter[] param = new SqlParameter[1];
if (ChID != 0)
{
param[0] = new SqlParameter("@ClassID", SqlDbType.Int, 4);
param[0].Value = int.Parse(ClassID);
//Sql = "Select id,SavePath,FileName From [" + Pre + "chanelclass] Where [id]=@ClassID";
//Edit By Puloon on 2008-06-02 修正自定义频道查看所有评论错误
Sql = "Select id,SavePath,FileName From [" + Pre + "sys_channelclass] Where [id]=@ClassID";
//End By Puloon
}
else
{
param[0] = new SqlParameter("@ClassID", SqlDbType.NVarChar, 12);
param[0].Value = ClassID;
Sql = "Select ClassID,SavePath,SaveClassframe From [" + Pre + "news_class] Where [ClassID]=@ClassID";
}
return DbHelper.ExecuteReader(CommandType.Text, Sql, param);
}
zj_chengwa - 2008-6-3 9:04:00
:_onion1:
雅紫OA - 2008-6-3 10:57:00
一楼的自定义频道好用吗,能不能发些标签代码出来,我测一下,谢谢。
i1314 - 2008-8-16 12:57:00
做个标记