473,289 Members | 2,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Updating typed dataset with the designer

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
4 2577

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
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
> 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michelle Stone | last post by:
Thanks for your message I tried again and again... but didn't work. Can u please detail the exact steps to perform? This is what I do. In field explorer, i right-click the dataset to update....
1
by: Trond | last post by:
I have a class MessageController that has a method GetMessagesDataset that connects to a database SPROC. When done it returns a dataset. Then in my ASP.NET for i do this: msgController = new...
11
by: tomp | last post by:
Hi, I am trying to insert a row into the Categories Table in Nothwinds database in MSDE. I am able to manually insert it using a query tool. Using the Debugger, it appears the DataSet loads...
0
by: Liming | last post by:
Hi, I designed a few DataSet Tables in the typed dataset dsigner. Recently, I encountered an error saying Failed to enable constraints. One or more rows contain values violating non-null,...
0
by: Scott_from_Carematic | last post by:
I'm trying to use a strongly typed dataset in my asp.net (2.0) project with visual studio 2005. I have generated the dataset and tableadapters in the designer. I'm using SQL server EE 2005 as the...
3
by: Jon B | last post by:
Hi There! I'm looking into Strongly Typed DataSets in the .NET Framework. I know it can generated strongly typed tables as objects and column names as properties. However, one thing that I...
8
by: Harry Strybos | last post by:
Visual Studio 2005 - SP1 - VB.Net on WinXP SP2 I add a typed dataset to my solution and get the following errors : Error 1 sub 'ReadXmlSerializable' cannot be declared 'Overrides' because it...
21
by: Peter Bradley | last post by:
Hi all, This post is sort of tangentially related to my earlier posts on configuration files for DLLs. Does anyone know how to create typed DataSets using VS2005's new DataSet designer, but...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.