GetChanges in a Typed Dataset returns a DataSet??

P

Paddy

Hi, given the following method signature in a data tier:

public MyTypedDataSet Update(MyTypedDataSet ds)


and the following business layer code:


MyTypedDataSet dsModified = new MyTypedDataSet ();
...
// some CRUD operations here with the dsModified dataset.
...
// let's suppose MyDataTier is a class handling database operations
MyDataTier.Update (dsModified.GetChanges()); // PROBLEM HERE!!!


Well, the compiler complains that it cannot convert a DataSet to a
MyTypedDataSet.

It turns up that the method GetChanges of a Typed Dataset returns a
DataSet, not a class of MyTypedDataSet (as I expected to do)

I need to pass *ONLY* the changes made to the DataSet, no the whole
DataSet and of course that I want to pass a 'MyTypedDataSet' class.

Could somebody help me to clarify this issue? (I don't want to use
un-typed dataset's)

Thanks.
Paddy.
 
G

Gavin Joyce

Hi,

Have a look at the following C# DAL class:

http://www.gavinjoyce.com/files/nTierGen/samplecode/ContactDAO_Base.cs.txt

And if your interested, the further classes listed here:

http://www.gavinjoyce.com/forums/ShowPost.aspx?PostID=206

I hope this helps,
Thanks.,
Gavin Joyce

--
___________________________________________________________
nTierGen.NET Code Generator - http://www.nTierGen.NET/

Stored Procedures (Get, GetPaged, Insert, Update, Delete)
Data Access Layer - C#
Business Rules Layer - C# & VB.NET
Strongly-Typed DataSets - C#
Web Services - C#
___________________________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top