Procedure or function if_sp_UpdateTopicLastPostInformation has too many arguments specified.


InstantForum Question
Ryan or anyone, 

Have you seen this error before? I have started to see this.
InstantForum Question

Hi Bryan,

Your using 2014 if I'm not mistaken. Can you check your "if_sp_UpdateForumLastPostInformation" stored procedure looks like the one shown below...

ALTER PROCEDURE [if_sp_UpdateForumLastPostInformation] (
@intForumID int,
@intLastPosterPostID int,
@intLastPosterUserID int,
@strLastPosterSubject nvarchar(300),
@strLastPosterUsername nvarchar(255),
@dtLastPosterDate datetime
)
AS
SET NOCOUNT ON
/* Updates last post information for a specific forum */
UPDATE InstantForum_Forums
SET InstantForum_Forums.LastPosterPostID = @intLastPosterPostID,
InstantForum_Forums.LastPosterUserID = @intLastPosterUserID,
InstantForum_Forums.LastPosterSubject = @strLastPosterSubject,
InstantForum_Forums.LastPosterDate = @dtLastPosterDate
WHERE (InstantForum_Forums.ForumID = @intForumID)

I look forward to your response,


http://www.instantasp.co.uk/images/line.gif
Kindest Regards,

Ryan Healey



ryan@instantasp.co.uk
www.instantasp.co.uk
Blog | Community | Docs

http://www.instantasp.co.uk/core/assets/images/email/facebook.png http://www.instantasp.co.uk/core/assets/images/email/twitter.png http://www.instantasp.co.uk/core/assets/images/email/google.png http://www.instantasp.co.uk/core/assets/images/email/linkedin.png

Sorry Bryan. That;s the wrong one - sorry. It should be "if_sp_UpdateTopicLastPostInformation" Please compare your version of this stored procedure with the one below...

 ALTER PROCEDURE [if_sp_UpdateTopicLastPostInformation] (
@intTopicID int,
@intLastPosterPostID int,
@intLastPosterUserID int,
@strLastPosterUsername nvarchar(255),
@dtLastPosterDate datetime
)
AS
SET NOCOUNT ON

IF (@intLastPosterPostID IS NULL)
SET @intLastPosterPostID = 0
IF (@intLastPosterUserID IS NULL)
SET @intLastPosterUserID = 0
IF (@dtLastPosterDate IS NULL)
SET @dtLastPosterDate = GetDate()

/* Updates last post information for a specific topic within InstantForum_Topics */
UPDATE InstantForum_Topics SET
InstantForum_Topics.LastPosterPostID = @intLastPosterPostID,
InstantForum_Topics.LastPosterUserID = @intLastPosterUserID,
InstantForum_Topics.LastPosterDate = @dtLastPosterDate
WHERE (InstantForum_Topics.PostID = @intTopicID)


http://www.instantasp.co.uk/images/line.gif
Kindest Regards,

Ryan Healey



ryan@instantasp.co.uk
www.instantasp.co.uk
Blog | Community | Docs

http://www.instantasp.co.uk/core/assets/images/email/facebook.png http://www.instantasp.co.uk/core/assets/images/email/twitter.png http://www.instantasp.co.uk/core/assets/images/email/google.png http://www.instantasp.co.uk/core/assets/images/email/linkedin.png

I think that is the wrong stored procedure. I am look at if_sp_UpdateTopicLastPostInformation. this is what I have


ALTER PROCEDURE [dbo].[if_sp_UpdateTopicLastPostInformation] (
@intTopicID int,
@intLastPosterPostID int,
@intLastPosterUserID int,
@dtLastPosterDate datetime
)
AS
SET NOCOUNT ON

IF (@intLastPosterPostID IS NULL)
SET @intLastPosterPostID = 0
IF (@intLastPosterUserID IS NULL)
SET @intLastPosterUserID = 0
IF (@dtLastPosterDate IS NULL)
SET @dtLastPosterDate = GetDate()

/* Updates last post information for a specific topic within InstantForum_Topics */
UPDATE InstantForum_Topics SET
InstantForum_Topics.LastPosterPostID = @intLastPosterPostID,
InstantForum_Topics.LastPosterUserID = @intLastPosterUserID,
InstantForum_Topics.LastPosterDate = @dtLastPosterDate
WHERE (InstantForum_Topics.PostID = @intTopicID)


Ah posting at the same time.. love it :)

Thank you Ryan, That was it.

Bryan N (9/19/2014)
Ah posting at the same time.. love it :)

hehe :hehe:

Please keep me posted :)

http://www.instantasp.co.uk/images/line.gif
Kindest Regards,

Ryan Healey



ryan@instantasp.co.uk
www.instantasp.co.uk
Blog | Community | Docs

http://www.instantasp.co.uk/core/assets/images/email/facebook.png http://www.instantasp.co.uk/core/assets/images/email/twitter.png http://www.instantasp.co.uk/core/assets/images/email/google.png http://www.instantasp.co.uk/core/assets/images/email/linkedin.png
GO

Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....







InstantASP Forums


Search