Wednesday, March 21, 2012

Database error help

I am working on a website that is currently being hosted. The website was configured for admin,guest and members. Everything was working fine.

I made no changes to code. When I log in as admin I am able to navigate to most of the pages however I keep getting this error.

From the error it seems to say that some of the required fields are null but they are not.


Some of the required attributes of Person are NULL in the Persons table

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.InvalidOperationException: Some of the required attributes of Person are NULL in the Persons table

Source Error:

Line 141: While r.Read()
Line 142: If TypeOf r("id") Is DBNull Or TypeOf r("visible") Is DBNull Or TypeOf r("firstName") Is DBNull Or TypeOf r("lastName") Is DBNull Then
Line 143: Throw New InvalidOperationException(Messages.PersonRequiredAttributesMissing)
Line 144: End If
Line 145:


Source File:E:\web\cabletrades\htdocs\App_Code\People\SqlPeopleProvider.vb Line:143

Stack Trace:

[InvalidOperationException: Some of the required attributes of Person are NULL in the Persons table]
SqlPeopleProvider.GetPersonsForApproval(String transactionTypeId) in E:\web\cabletrades\htdocs\App_Code\People\SqlPeopleProvider.vb:143
AdminAccountApproval.Page_Load(Object sender, EventArgs e) in E:\web\cabletrades\htdocs\AdminAccountApproval.aspx.vb:42
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061



Instead of If TypeOf r("id") is dbNull or ....

A person could try this

If r("id") is nothing or .....

hope this helps

DK

No comments:

Post a Comment