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

Updating typed dataset with the designer

P: n/a
I've been using the dataset designer in Visual Studio to create typed
datasets for my application by dragging over tables from the Server Explorer
and dropping them into the designer. The problem is, when I modify these
tables in SQL Server (typically adding fields and what not), there doesnt
seem to be an easy way to update the typed dataset. If I delete the
previous table definition and drop a new one on, all of the relationships
are broken. Is there an easy way to update the definitions in the dataset
designer that I'm missing? I know I can make the modifications directly to
the element objects, etc. but I was hoping for a more automated approach.
In an ideal world, my table structures would be perfectly planned out so
that I wouldnt be making such changes as I code them...but I've never lived
in that world :-)

Thanks

Dave Taylor
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

Running again the DataAdapter Configuration Wizard and then Generate DataSet
Wizard should resolve this problem.

Anyway, before altering the fields in the database, it's better to run the
DataAdapter Configuration Wizard and eliminate(from the Select command) the
fields you intend to alter. After you modified the structure of the table
run gain the DataAdapter Configuration Wizard(to include the new fields) and
then
Generate DataSet Wizard to update the typed DataSet class.

Ernest
"Dave Taylor" <no*********@processeng.com> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
I've been using the dataset designer in Visual Studio to create typed
datasets for my application by dragging over tables from the Server Explorer and dropping them into the designer. The problem is, when I modify these
tables in SQL Server (typically adding fields and what not), there doesnt
seem to be an easy way to update the typed dataset. If I delete the
previous table definition and drop a new one on, all of the relationships
are broken. Is there an easy way to update the definitions in the dataset
designer that I'm missing? I know I can make the modifications directly to the element objects, etc. but I was hoping for a more automated approach.
In an ideal world, my table structures would be perfectly planned out so
that I wouldnt be making such changes as I code them...but I've never lived in that world :-)

Thanks

Dave Taylor

Nov 20 '05 #2

P: n/a
Thanks for the reply. Though I hadnt used the Wizards to generate the data
set or adapters...I'd only used the data set designer and drag-n-dropped the
SQL tables onto the designer from the Server Explorer, so maybe I'm stuck
with updating the SQL tables and performing the same updates in the designer
:-( I'm not a big fan of the Wizards, they always seem so limited in their
applicability.

"Ernest Morariu" <er****@gesora.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...

Running again the DataAdapter Configuration Wizard and then Generate DataSet Wizard should resolve this problem.

Anyway, before altering the fields in the database, it's better to run the DataAdapter Configuration Wizard and eliminate(from the Select command) the fields you intend to alter. After you modified the structure of the table
run gain the DataAdapter Configuration Wizard(to include the new fields) and then
Generate DataSet Wizard to update the typed DataSet class.

Ernest
"Dave Taylor" <no*********@processeng.com> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
I've been using the dataset designer in Visual Studio to create typed
datasets for my application by dragging over tables from the Server

Explorer
and dropping them into the designer. The problem is, when I modify these tables in SQL Server (typically adding fields and what not), there doesnt seem to be an easy way to update the typed dataset. If I delete the
previous table definition and drop a new one on, all of the relationships are broken. Is there an easy way to update the definitions in the dataset designer that I'm missing? I know I can make the modifications directly

to
the element objects, etc. but I was hoping for a more automated approach. In an ideal world, my table structures would be perfectly planned out so
that I wouldnt be making such changes as I code them...but I've never

lived
in that world :-)

Thanks

Dave Taylor


Nov 20 '05 #3

P: n/a
> I'd only used the data set designer and drag-n-dropped the
SQL tables onto the designer from the Server Explorer
Doing this you implicitly used the DataAdapter Configuartion Wizard.
You can modify your dataadapters commands running again this
wizard(right-click the dataadapter object in the component-tray and select
the "DataAdapter Configuration...").

Without these two wizards my work would slow down about 20 times. Try them.

Ernest

"Dave Taylor" <no*********@processeng.com> wrote in message
news:e3*************@TK2MSFTNGP12.phx.gbl... Thanks for the reply. Though I hadnt used the Wizards to generate the data set or adapters...I'd only used the data set designer and drag-n-dropped the SQL tables onto the designer from the Server Explorer, so maybe I'm stuck
with updating the SQL tables and performing the same updates in the designer :-( I'm not a big fan of the Wizards, they always seem so limited in their applicability.

"Ernest Morariu" <er****@gesora.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...

Running again the DataAdapter Configuration Wizard and then Generate

DataSet
Wizard should resolve this problem.

Anyway, before altering the fields in the database, it's better to run

the
DataAdapter Configuration Wizard and eliminate(from the Select command)

the
fields you intend to alter. After you modified the structure of the table
run gain the DataAdapter Configuration Wizard(to include the new fields)

and
then
Generate DataSet Wizard to update the typed DataSet class.

Ernest
"Dave Taylor" <no*********@processeng.com> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
I've been using the dataset designer in Visual Studio to create typed
datasets for my application by dragging over tables from the Server

Explorer
and dropping them into the designer. The problem is, when I modify these tables in SQL Server (typically adding fields and what not), there doesnt seem to be an easy way to update the typed dataset. If I delete the
previous table definition and drop a new one on, all of the relationships are broken. Is there an easy way to update the definitions in the dataset designer that I'm missing? I know I can make the modifications directly to
the element objects, etc. but I was hoping for a more automated approach. In an ideal world, my table structures would be perfectly planned out

so that I wouldnt be making such changes as I code them...but I've never

lived
in that world :-)

Thanks

Dave Taylor



Nov 20 '05 #4

P: n/a
CodeSmith has templates that can query a table and generate typed datasets,
stored procs and anything else you can think of.

http://www.ericjsmith.net/codesmith/

"Dave Taylor" <no*********@processeng.com> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
I've been using the dataset designer in Visual Studio to create typed
datasets for my application by dragging over tables from the Server Explorer and dropping them into the designer. The problem is, when I modify these
tables in SQL Server (typically adding fields and what not), there doesnt
seem to be an easy way to update the typed dataset. If I delete the
previous table definition and drop a new one on, all of the relationships
are broken. Is there an easy way to update the definitions in the dataset
designer that I'm missing? I know I can make the modifications directly to the element objects, etc. but I was hoping for a more automated approach.
In an ideal world, my table structures would be perfectly planned out so
that I wouldnt be making such changes as I code them...but I've never lived in that world :-)

Thanks

Dave Taylor

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.