Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not set to an instance of an object
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01349927
Message ID:
01352522
Views:
25
Stuart,

>I am trying to call my business objects from a vanilla dll. In my tests everything works fine, but when I try calling the function that uses the business objects from VFP I get the error below. I assume I am not pulling in the all the MM classes into the main solution, but I have set references.
>Thanks
>Stuart
>I know this is all a bit vague but it’s the best I can do at the moment
>
>
>
>
>System.NullReferenceException was caught
>  Message="Object reference not set to an instance of an object."
>  Source="OakLeaf.MM2008.Framework"
>  StackTrace:
>       at OakLeaf.MM.Main.mmAppBase.get_AppSettingsMgr()
>       at nms.apc.business.ABusinessObject`1.get_myColl() in F:\vs2008liveProjects\wsBusiness\ABusinessObject.cs:line 120
>  InnerException:
>
>
You should instantiate an instance of your application object before instantiating and using instances of your business objects---much the same as you do when instantiating them from Visual Studio's Object Test Bench. So, in VFP you could instantiate an instance of AAppTest first, then instantiate an instance of your business object.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform