Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Fatal error 3624 occurred

Author  Topic 

robertnzana
Starting Member

42 Posts

Posted - 2008-05-24 : 22:56:21
I have a "user admin" webpage. It's where I add, edit and delete users in the database.

I run this page on my dev machine and it updates perfecty!!!

I upload it to the server, go to edit/update data and it gives me this error. Anyone knows what this is?

ERROR:
System.Data.SqlClient.SqlException: Warning: Fatal error 3624 occurred at May 24 2008 7:50PM. Note the error and time, and contact your system administrator. A severe error occurred on the current command. The results, if any, should be discarded. Location: memilb.cpp:1624 Expression: pilb->m_cRef == 0 SPID: 270 Process ID: 3268 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.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at admin_ManageAllUsers.FormView1_ItemCommand(Object sender, FormViewCommandEventArgs e) in d:\hosting\member\abcde\myprogram\customer\ManageAllUsers.aspx.vb:line 132

LINE 132 (VB.NET code)
i = MyCommand.ExecuteNonQuery

SQL STORED PROC
ALTER PROCEDURE dbo.UpdateCompanyUsers
(
@UserId uniqueidentifier,
@CompanyUserId int,
@CompanyId int,
@FirstName nvarchar(MAX),
@LastName nvarchar(MAX),
@Phone nvarchar(MAX),
@Phone2 nvarchar(MAX),
@Fax nvarchar(MAX),
@Email nvarchar(MAX),
@RoleId uniqueidentifier
)
AS

BEGIN
--- Modify CompanyUsers if necessary
UPDATE CompanyUsers
SET
CompanyId=@CompanyId,
FirstName=@FirstName,
LastName=@LastName,
Phone=@Phone,
Phone2=@Phone2,
Fax=@Fax
WHERE (CompanyUserId = @CompanyUserId)

--- Modify Email if necessary
UPDATE dbo.aspnet_Membership
SET
Email = @Email,
LoweredEmail = LOWER(@Email)
WHERE
UserId = @UserId

--- Modify Role if necessary
UPDATE dbo.aspnet_UsersInRoles
SET
RoleId = @RoleId
WHERE
UserId = @UserId

RETURN
END

Zack
Starting Member

26 Posts

Posted - 2008-06-02 : 15:20:12
You might want to check your event logs to see if there's any additional information that can give you a clue as to what is going on. One thing that jumps out at me is the Modify Role information. I know the .net framework generates an exception if you try to assign a role to a user and that user is already in that role. You should really handle the role assignment using the Roles capability built into the framework and not trying update it directly from an SP.
Go to Top of Page

robertnzana
Starting Member

42 Posts

Posted - 2008-06-02 : 15:46:31
thanks zach - i'll take a look
Go to Top of Page
   

- Advertisement -