Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving SQL Data with a Stored Procedure
Message
From
02/03/2006 21:47:29
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Retrieving SQL Data with a Stored Procedure
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01101144
Message ID:
01101144
Views:
59
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
Next
Reply
Map
View

Click here to load this message in the networking platform