when I excuted Sql 03.01.05.SqlDataProvider(Articles03.01.05) have a error:
System.Data.SqlClient.SqlException: There is already an object named 'Articles_AddArticle' in the database. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) CREATE PROCEDURE dbo.Articles_AddArticle @PortalId int, @ModuleId int, @CategoryId int, @UserId int, @Title nvarchar(150), @Description nvarchar(2000), @Authed bit, @Featured bit, @Article ntext, @ImageFIle nvarchar(200), @PublishDate datetime, @ExpireDate datetime AS INSERT INTO dbo.Article( PortalId, ModuleId, CategoryId, UserId, CreatedDate, Title, Description, Authed, Featured, Article, ImageFile, PublishDate, ExpireDate ) VALUES ( @PortalId, @ModuleId, @CategoryId, @UserId, GetDate(), @Title, @Description, @Authed, @Featured, @Article, @ImageFile, @PublishDate, @ExpireDate ) System.Data.SqlClient.SqlException: Line 33: Incorrect syntax near 'GO'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) /***************************************************************************/ CREATE PROCEDURE dbo.Articles_UpdateArticle @ItemId int, @CategoryId int, @UserId int, @Title nvarchar(150), @Description nvarchar(2000), @Authed bit, @Featured bit, @Article ntext, @ImageFIle nvarchar(200), @PublishDate datetime, @ExpireDate datetime AS UPDATE dbo.Article SET CategoryId = @CategoryId, UserId = @UserId, LastModifiedDate = GetDate(), Title = @Title, Description = @Description, Authed = @Authed, Featured = @Featured, Article = @Article, ImageFile = @ImageFile, PublishDate = @PublishDate, ExpireDate = @ExpireDate WHERE ItemId = @ItemId GO
|