Strongly Typed dataset

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.
 
R

Richard A. Lowe

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top