Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom data access class - IDataAdapter.SelectCommand
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00950319
Message ID:
00950870
Views:
14
Ric,

>In addition to the dataset, FillDataSet also wants an IDbCommand or string (SQL statement), which is what seems redundant, given that the SqlDataAdapter in my custom data access class already has the IDbCommand and TableMappings it needs (in the SelectCommand member) to fill the dataset.

In that case you can simply override your business object's CreateDataSet() method so it always instantiates an instance of your typed DataSet. For example:
protected override mmDataSet CreateDataSet()
{
	return new MyDataSet();
}
Note that you must make sure your strongly typed DataSet is subclassed from mmDataSet. Also, note that you CAN specify different SELECT commands for a typed DataSet...you can call one of the GetDataSet() overloads and pass a new SELECT statement that will retrieve different data into the typed DataSet.

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