views:

333

answers:

0

I have a static class which loads the initial data for my c# windows forms application. The data is retrieved via 1 sqldataadapter with one query selecting from multiple sql server tables. These are then used to populate multiple datatables like so and filled into my dataset

da.TableMappings.Add("Table", "ChannelTypes");
da.TableMappings.Add("Table1", "Channels");
da.TableMappings.Add("Table2", "SourceKeys");

Since I only have one sqldataadapter object, is there a way to use the UpdateCommand / InsertCommand and specify which command should run against a specific datatable?

Is it considered bad practice to run multiple queries in a sqlcommand to pull data like this?