Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View into Dataset
Message
From
06/11/2009 12:54:00
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
06/11/2009 12:45:49
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01433587
Message ID:
01433598
Views:
29
>Eric,
>
>You can use methods on the busines object that returns a DataSet or you can use the normal methods and then do this.
>
>// Call the business object method just like you normally would for entities or entity lists.
>this.oLookups.GetLookupsByType("CustomerTypes");
>// Then retrieve the DataSet from the dataset property of the business object.
>DataSet dsLookups = this.oLookups.DataSet;
>
>
>You can also create methods on your business object that return a dataset to start with.
>Hope that helps.
>Tim
>
>>What would be the easiest way to get a SQL Server view down into a dataset? I don't really need a business object or anything else for this.
>>
>>Thanks,
>>
>>Eric

I just re-read your question and see I missed the point. I assumed since it was in the mm area, you were asking this about biz objs.

I still think if you are using mm the easiest way is to use a business object to get the data. You can either create a business object that matches the view or use an existing one that is appropriate but since it comes from a view and not a stored procedure you will most likely need to use SQL statement in your method and definately return it into a DataBase.
// In your business object
public DataSet GetLookupByType(string lookupType)
{
     // If you use DataSet as your return type and call a method to retrieve a DataSet it should be the easiest.
     return this.GetDataSet("SELECT * FROM MyView....");
}
This way you do not have to worry about the connections and such as it is all taken care of for you.
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform