Strongly Typed dataset

  • Thread starter Thread starter Imran
  • Start date Start date
I

Imran

Hello,

I have a typed dataset defined in my project. I am writing a user control
which needs to invoke an instance of that dataset. Problem is that the page
developer only provides the name of the dataset to my user control.
I want my user control to invoke an instance of that dataset from its
"string" representation of the type.
I used type.gettype("Mydatasettype") , but ctype function would not accept
it as a valid type.

Any help is appreciated.
 
Like any other compiled class the generated strongly-typed DataSet can be
accessed by System.Reflection at run-time. The easiest way to do this is
probably with the Activator.CreateInstance(..) method, but I'm fairly
certain you'll have to load the Assembly that has the DataSet in it manually
(if it's not already loaded - you'll have to check for that as well).

Does that help?
Richard
 
Back
Top