Discuz!Nt上传附件出错(dnt_createattachment参数过多),修正方法

升级到 3.0后,上传附件出错(dnt_createattachment参数过多),这是存储过程引起的,运行以下SQL语句即可

IF OBJECT_ID('dnt_createattachment','P') IS NOT NULL  DROP PROCEDURE [dnt_createattachment]  GO     CREATE PROCEDURE [dnt_createattachment]  @uid int,  @tid int,  @pid int,  @postdatetime datetime,  @readperm int,  @filename nchar(200),  @description nchar(200),  @filetype nchar(100),  @filesize int,  @attachment nchar(200),  @downloads int,  @extname nvarchar(50),  @attachprice int,  @width int,  @height int  AS  DECLARE @aid int    INSERT INTO [dnt_attachments]([uid],[tid], [pid], [postdatetime], [readperm], [filename], [description], [filetype], [filesize],  [attachment], [downloads],[attachprice],[width],[height]) VALUES(@uid, @tid, @pid, @postdatetime, @readperm, @filename, @description, @filetype, @filesize,  @attachment, @downloads, @attachprice,@width,@height)  SELECT SCOPE_IDENTITY()  AS 'aid'    set @aid=(SELECT SCOPE_IDENTITY()  AS 'aid')  UPDATE [dnt_posts1] SET [attachment]=1 WHERE [pid]=@pid  GO
不允许评论