首先检查 您数据库中 是否存在这个名为 dnt_getmyposts 的存储过程, 如果存在 ,检查其所有者 和其他存储过程是否一致。
系统后台 运行如下sql语句
CREATE PROCEDURE [dnt_getmyposts]
@uid int,
@pageindex int,
@pagesize int
AS
DECLARE @strSQL varchar(5000)
IF @pageindex = 1
BEGIN
SET @strSQL = 'SELECT [tid], [fid], [iconid], [typeid], [readperm], [price], [poster], [posterid], [title], [postdatetime], [lastpost], [lastpostid], [lastposter], [lastposterid], [views], [replies], [displayorder], [highlight], [digest], [rate], [hide], [special], [attachment], [moderated], [closed], [magic]
FROM [dnt_topics]
WHERE [tid] IN (
SELECT DISTINCT TOP ' + STR(@pagesize) + ' [tid]
FROM [dnt_myposts]
WHERE [uid]=' + STR(@uid) + '
ORDER BY [tid] DESC
)
ORDER BY [tid] DESC'
END
ELSE
BEGIN
SET @strSQL = 'SELECT [tid], [fid], [iconid], [typeid], [readperm], [price], [poster], [posterid], [title], [postdatetime], [lastpost], [lastpostid], [lastposter], [lastposterid], [views], [replies], [displayorder], [highlight], [digest], [rate], [hide], [special], [attachment], [moderated], [closed], [magic]
FROM [dnt_topics]
WHERE [tid] IN (
SELECT DISTINCT TOP ' + STR(@pagesize) + ' [tid]
FROM [dnt_myposts]
WHERE [uid]=' + STR(@uid) + '
AND [tid] < (
SELECT MIN([tid])
FROM (
SELECT DISTINCT TOP ' + STR((@pageindex-1)*@pagesize) + ' [tid]
FROM [dnt_myposts]
WHERE [uid]=' + STR(@uid) + '
ORDER BY [tid] DESC
) AS [ttt]
)
ORDER BY [tid] DESC
)
ORDER BY [tid] DESC'
END
EXEC(@strSQL)