The only thing I can think of is that you can access a strongly
typed dataset as an untyped one. So you could convert the
strongly-typed datatable to your derived datatable in order to
use whatever methods you want to use. You can then convert it
back to the strongly-typed dataset *IF* you haven't changed
its structure.
You can NOT convert any old untyped dataset to a strongly typed one
-- you can only convert one that was originally instantiated as the
strongly typed dataset.
'This is VB2005.
Dim dsStronglyTyped As New NorthwindDataSet()
Dim dsUntyped As DataSet
dsUnTyped = CType(dsStronglyTyped, DataSet)
'do some stuff to the data in the dataset, then convert it back
dsStronglyTyped2 = CType(dsUntyped, NorthwindDataSet)
Of course, you lose the features of the strongly typed dataset
when dealing with the untyped one.
Good luck.
Robin S.
----------------------------------------
>I know I shouldn't manually edit generated code thats why Im looking
> for automatically inherit from MyDataSet.
>
> there must be a way to changing cause I want to optionally implement
> specified methods (and do not want the implementation to be mandatory
> by using interfaces)
orenl - 28 Dec 2006 12:01 GMT
but my problem is that I don't want to loose the benefits of strongly
typed DataSet.
there must be a way to extend the VisualStudio2005 typedDataSet
designer.
the current designer is MSDataSetGenerator and I don't know how to see
its code.
RobinS - 28 Dec 2006 17:49 GMT
You could try generating your own typedDataSet.
You create your dataset in code using FillSchema,
then do a dataset.WriteXmlSchema to create an XSD file.
Then you use the XML Schema Definition Tool to generate
a class file based on the XML schema. Then you can
add the class to your project.
I can post the code if you want me to, but I'm not sure it
is going to get you anywhere. It's pretty much the same as
doing it in Visual Studio.
Other than that, I don't know of a way to do what you're
trying to do. You could try posting to
microsoft.public.dotnet.framework.adonet
and see if Bill Vaughn can help you.
Robin S.
--------------------------------------
> but my problem is that I don't want to loose the benefits of strongly
> typed DataSet.
[quoted text clipped - 3 lines]
> the current designer is MSDataSetGenerator and I don't know how to see
> its code.