By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,894 Members | 1,942 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,894 IT Pros & Developers. It's quick & easy.

get TableAdapters command at run-time ?

P: n/a
I have multiple tables that have the same structrues that I need to switch
at run-time.

for example, I have table A, B and C, they all have the same structure. At
run-time, the GUI will determin which table I'll be queriying on.

I can build the Datasets and TableAdapters at design time, but I can't seem
to access the (select) commands at run-time. If I do, I can just replace the
talbe name and it shoud query on the table I have specified.

I guess I can use the DataAdapters , get the commands and change them at
run-time. I'm just wondering about the TableAdaters, since that's the
default that Visual Studio 2005 creaets.

Thanks!

WJ
Sep 27 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Am Wed, 27 Sep 2006 16:01:03 -0500 schrieb Wanjun Yu:

Hello Wanjun,
I have multiple tables that have the same structrues that I need to switch
at run-time.

for example, I have table A, B and C, they all have the same structure. At
run-time, the GUI will determin which table I'll be queriying on.

I can build the Datasets and TableAdapters at design time, but I can't seem
to access the (select) commands at run-time. If I do, I can just replace the
talbe name and it shoud query on the table I have specified.

I guess I can use the DataAdapters , get the commands and change them at
run-time. I'm just wondering about the TableAdaters, since that's the
default that Visual Studio 2005 creaets.
You can add as many select statements as you want to every TableAdapter.
The Visual Studio 2005 IDE supports a wizard for this kind of editing.
Furthermore, it's no problem to extend the Dataset class because Visual
Studio 2005 uses partial classes, so it is very easy to add code riskless
to auto generated classes.

Bye

Frank Loizzi
Dortmund, Germany
Sep 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.