Re: Dataset and typed datasets by Miha
Miha
Mon Sep 06 04:24:07 CDT 2004
Hi Bart,
No, you can't as typed dataset is derived from dataset.
And you can't cast upwards.
Instead, you might consider doing a Merge into typed dataset.
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com
"Bart Schelkens" <BSchelkens@hotmail.com> wrote in message
news:eWrfUK$kEHA.1904@TK2MSFTNGP09.phx.gbl...
>I have several tables that have the same layout.
> I wrote a function that gets me a dataset from the database.
> This function returns a simple dataset.
> And now in order to have the advantages of the typed dataset I would like
> to
> cast the dataset returned from my database to a typed dataset.
>
>
> "Cor Ligthert" <notfirstname@planet.nl> wrote in message
> news:O81ILF$kEHA.2340@TK2MSFTNGP11.phx.gbl...
>> Bart,
>>
>> >
>> > is there a way to cast a normal dataset to a typed dataset?
>> > I tried using the directcast but that didn't seem to work.
>> >
>>
>> This makes me curious, why would you do that. Normally you should just
>> use
>> the typed dataset. I see not any reason to do that, so it really makes me
>> curious why.
>>
>> Cor
>>
>>
>
>