1
Vote

SPForumsGetByCategory dbUp script problem

description

Hi,

The mssql.0057.alter-proc-forum-get-by-category.sql file has an error on line 20
TU.UserName as [Topic.UserId] 
I believe should be:
,TU.UserName as [Topic.UserName]
Also ForumsDataAccess has an error relating to the changes in the mssql.0057.alter-proc-forum-get-by-category.sql that haven't been taken into account in the following function:
protected virtual Forum ParseForumWithTopicDataRow(DataRow dr)
{
    Forum f = ParseForumDataRow(dr);

    if (!dr.IsNull("TopicCreationDate"))
    {
        f.LastTopic = new Topic();
        f.LastTopic.User = new User(dr.Get<int>("Topic.UserId"), dr.Get<string>("Topic.UserName"));
        f.LastTopic.Id = dr.Get<int>("TopicId");
        f.LastTopic.Date = dr.GetDate("TopicCreationDate");
        f.LastTopic.Title = dr.GetString("TopicTitle");
        f.LastTopic.ShortName = dr.GetString("TopicShortName");
    }

    return f;
}
I changed the f.LastTopic.User = new User(dr.Get<int>("UserId"), dr.Get<string>("UserName")); to match the one above.

this got me working again, but I am not sure if I've missed something.
Thanks
Andy

comments