Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error calling method in business object
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01142858
Message ID:
01143013
Views:
13
This message has been marked as the solution to the initial question of the thread.
>Maybe it's just because it's late in the day but I can't seem to figure out why I get an error trying to run a method in my business object. I get an error "Object reference is not set to an instance of an object." Here's the code:
>
>
>        this.oOnRent.GetOpenItems(this.ddlRequisitioner.SelectedValue, this.ddlApprovers.SelectedValue, this.ddlInvClass.SelectedValue);
>
>
>There are values for each of the parameters and it's not even reaching the code in the business object. I tried changing it to:
>
>
>DataSet ds = this.oOnRent.GetOpenItems(this.ddlRequisitioner.SelectedValue, this.ddlApprovers.SelectedValue, this.ddlInvClass.SelectedValue);
>
>
>I still get the same error.
>
>Any suggestions?
>

One of the objects you're referecing is set to null (e.g. this.oOnRent, or this.ddlRequisitioner, etc.). Just hover over them in the debugger to find out which one is the source of the problem.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform