Dataset and typed datasets

  • Thread starter Thread starter Bart Schelkens
  • Start date Start date
B

Bart Schelkens

Hi,

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.

Thx
 
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
 
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.
 
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.
 
Back
Top