Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using MM Business Objects in a COM wrapper C# dll
Message
From
26/05/2006 10:27:16
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Using MM Business Objects in a COM wrapper C# dll
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01125274
Message ID:
01125274
Views:
45
I have a COM exposed method that is being called successfully from Visual FoxPro. I have added a business object based upon several tables in my MS SQL Server database. When I try to do anything that connects to the data I get an exception with this Message:

Object reference not set to an instance of an object.
 
Here is the call stack:

at OakLeaf.MM.Main.Business.mmBusinessObject.CreateDataSet()
at OakLeaf.MM.Main.Business.mmBusinessObject.GetEmptyDataSet(String tableName, String databaseKey)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetEmptyDataSet(String tableName)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetEmptyDataSet()
at IDSCOM.IDSClass.IDSMethod(String param1, String param2) in C:\Documents and Settings\mgormley\My Documents\Visual Studio 2005\Projects\IDSCOM2\IDSCOM\ABusinessObject.cs:line 97


Here is the code, line 97 is the call to GetEmptyDataSet:

Customer myCustomer = new Customer();
try
{
myCustomer.GetEmptyDataSet();
}
catch (Exception e)
{
return e.StackTrace;
}

I get the same error when I try to use other SQL operations like the call to the GetOrderByOrderID method in the Northwind sample business class.

Note that when I call my method from a C# MM form application it works properly.
I am also able to get my method to retrieve from the database, called from VFP, using ADO.NET.

Finally, when I call my method from a non-MM C# windows form application I get the same failure result.

Please let me know if you have any ideas why this is not working.
Next
Reply
Map
View

Click here to load this message in the networking platform