ALTER PROCEDURE [dbo].[InsertCTopices]
@newid NVARCHAR(100) output,
@Title NVARCHAR(1000),
@Contents varchar(max),
@AuthorUserId bigint,
@AuthorUserName NVARCHAR(1000),
@PageViews int,
@InsertTime NVARCHAR(1000),
@PostUserId bigint,
@PostUserName NVARCHAR(1000),
@PostTime NVARCHAR(1000),
@State NVARCHAR(1000),
@CommunityId bigint,
@CTopicesTypeId NVARCHAR(1000)
AS
SET NOCOUNT ON;
BEGIN
DECLARE @sqlstr NVARCHAR(MAX)
SET @sqlstr = 'INSERT INTO [CTopices] (Title,Contents,AuthorUserId,AuthorUserName,PageViews,InsertTime,PostUserId,PostUserName,PostTime,[State],CommunityId,CTopicesTypeId) VALUES ( '''+@Title+''','''+@Contents+''','+ CONVERT(nvarchar,@AuthorUserId,1000)+','''+@AuthorUserName+''','+CONVERT(nvarchar,@PageViews,1000)+','''+@InsertTime+''','+CONVERT(nvarchar,@PostUserId,1000)+','''+@PostUserName+''','''+@PostTime+''','''+@State+''','+CONVERT(nvarchar,@CommunityId,1000)+','''+@CTopicesTypeId+''');';
SET @sqlstr = @sqlstr + 'SELECT @newid = SCOPE_IDENTITY();';
END
具体是什么错误啊?
EXEC(@sqlstr)