Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving SQL Data with a Stored Procedure
Message
From
03/03/2006 13:27:59
 
 
To
03/03/2006 11:18:54
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01101144
Message ID:
01101337
Views:
12
Hey Jason,

Thanks, I just found the error though. When instantiating objects on the test bench the mmAppBase.Factory never gets assigned. I created and assigned the Factory object in the constructor of the class I was testing and it worked.

Aloha,

James

>Hello James,
>
>Could you post the error stack trace? That should help determine where/what the problem is.
>
>Thanks,
>---J
>
>>Hi All,
>>
>>
>>I'm having trouble doing what should be really simple.
>>
>>I have a table in SQL that has a list of Glass types "Glass". I have a stored procedure that returns the entire list of glasses, "Glass_SelAllProc".
>>
>>I'm trying to build a business objec that will retrieve the Glass data. I create a business object class derived from ABusinessObject. I set the TableName and PrimaryKey in the constructor. I have another method TestIt with the following code:
>>
>>
>>DataSet ds = null;
>>ds = this.GetDataSet("Glass_SelAllProc",System.Data.CommandType.StoredProcedure);
>>return ds;
>>
>>
>>I create the object in the Object Test Bench and invoke the method TestIt(). On the line calling te GetDataSet method I get an erro saying "Method Invoke Failed".
>>
>>Under Details it says:
>>
>>An unhandled exception of type 'System.NullReferenceException' occurred in Mere Mortals Framework 2005.dll
>>
>>Additional information: Object reference not set to an instance of an object.
>>
>>
>>Any ideas?
>>
>>Aloha,
>>
>>James
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform