shahzadgodil
  • Posts: 4
  • Joined: 15/06/2012
Hi,

We are trying to test this webservice message.
http://yafnet.codeplex.c...asses%2fYafWebService.cs 

Our code is

LegacyDb.topic_save(1, "Subject", "", URL, description, message, userid,0, null, "1.1.1.1", DateTime.UtcNow, 1, 30, ref messageId);

This is creating new topic fine in topic table as well as one record in message table. But it is not updating NumPosts field of topic to 1. And because of this, topic is not showing in forum.

If we change NumPosts manually to 1 then it is populating in web.

Please let me know how to fix this?

Shahzad Godil
Sponsor
tha_watcha
  • Posts: 4081
  • Joined: 06/03/2010
Originally Posted by: shahzadgodil

Hi,

We are trying to test this webservice message.
http://yafnet.codeplex.c...asses%2fYafWebService.cs 

Our code is

LegacyDb.topic_save(1, "Subject", "", URL, description, message, userid,0, null, "1.1.1.1", DateTime.UtcNow, 1, 30, ref messageId);

This is creating new topic fine in topic table as well as one record in message table. But it is not updating NumPosts field of topic to 1. And because of this, topic is not showing in forum.

If we change NumPosts manually to 1 then it is populating in web.

Please let me know how to fix this?

Shahzad Godil



30 looks like the wrong flag which indicates that the message is deleted, you should try 22 instead.
UserPostedImage
shahzadgodil
  • Posts: 4
  • Joined: 15/06/2012
It worked like a charm with status code 22
LegacyDb.topic_save(forumID, subject, 1, URL, description, message, userid, 0, null, "1.1.1.1", DateTime.UtcNow, 1, 22, ref messageId);
Users browsing this topic
    Forum Jump  
    • You cannot post new topics in this forum.
    • You cannot reply to topics in this forum.
    • You cannot delete your posts in this forum.
    • You cannot edit your posts in this forum.
    • You cannot create polls in this forum.
    • You cannot vote in polls in this forum.

    About Us

    The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

    Powered by Resharper Donate with PayPal button

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved