I have absolutely no idea why this happens. I am calling the SqlHelper.ExecuteScalar with the proper parameters (the sproc works and the record is being added) and it returns null. This is the invocation: public override int Articles_Add(ArticlesInfo articlesinfo_toAdd, int portalId) { try { return (int)SqlHelper.ExecuteScalar(ConnectionString, GetFullyQualifiedName("MareNectaris_Articles_AddArticle"), articlesinfo_toAdd.ModuleId, portalId, articlesinfo_toAdd.CategoryId, articlesinfo_toAdd.AuthorId, articlesinfo_toAdd.CreatedByUserId, articlesinfo_toAdd.EditorId, articlesinfo_toAdd.DateCreated, articlesinfo_toAdd.DateLastModified, articlesinfo_toAdd.DateStart, articlesinfo_toAdd.DateEnd, articlesinfo_toAdd.DatePriorityEnd, articlesinfo_toAdd.CreatedByUserName, articlesinfo_toAdd.AuthorName, articlesinfo_toAdd.EditorName, articlesinfo_toAdd.EditorAddnotations, articlesinfo_toAdd.Title, articlesinfo_toAdd.Lead, articlesinfo_toAdd.FullText, articlesinfo_toAdd.KeyWords, articlesinfo_toAdd.IsApproved); } catch (Exception exc) { DotNetNuke.Services.Exceptions.Exceptions.LogException(exc); return -1; } }------------------------------this keeps crashing due to the reference not set exception. The sproc code (checked it in the query analizer, it works) code is here: CREATE PROCEDURE MareNectaris_Articles_AddArticle @ModuleId int, @portalId int, @CategoryId int, @AuthorId int, @CreatedByUserId int, @EditorId int, @DateCreated datetime, @DateLastModified datetime, @DateStart datetime, @DateEnd datetime, @DatePriorityEnd datetime, @CreatedByUserName nvarchar (500), @AuthorName nvarchar (500), @EditorName nvarchar (500), @EditorAddnotations nvarchar, @Title nvarchar (500), @Lead nvarchar (1024), @FullText ntext, @KeyWords nvarchar (400), @IsApproved bit AS BEGIN
SET NOCOUNT ON;
INSERT INTO MareNectaris_Articles ( ModuleId, portalId, CategoryId, AuthorId, CreatedByUserId, EditorId, DateCreated, DateLastModified, DateStart, DateEnd, DatePriorityEnd, CreatedByUserName, AuthorName, EditorName, EditorAddnotations, Title, Lead, [FullText], KeyWords, IsApproved ) VALUES ( @ModuleId, @portalId, @CategoryId, @AuthorId, @CreatedByUserId, @EditorId, @DateCreated, @DateLastModified, @DateStart, @DateEnd, @DatePriorityEnd, @CreatedByUserName, @AuthorName, @EditorName, @EditorAddnotations, @Title, @Lead, @FullText, @KeyWords, @IsApproved ) return Scope_Identity()
END
------------------------------ Is this behaviour of the ExecuteScalar something that anyone else has run into?
|
|
|