A group blog from members of the VB team
A statement we hear a lot is:
“The Typed DataSet is great, but the DataAdapters don’t support joined queries. I need a relational model in the database, but I need my application model to flatten things out:”
Using the Data Component Wizard, which is essentially the 2003 DataAdapter Wizard, developers can create an updatable joined select statement.
Using Visual Studio 2005 Beta 1 you can use the following steps:
This is the same model that works with the 2002 and 2003 DataAdapter wizards. While this only updates a single table it is possible to update multiple tables using the RowUpdated and RowUpating events which are exposed through the partial class. (But that’s a topic for another entry…)
Supporting Joins directly in the wizard
We have discussed how we might support this in the initial pass through the wizard. As with all the great ideas we’ve received from customers, we need to figure out when to stop so we can just ship already. However, should our team get ahead of schedule we are considering the following:
When we detect a joined query, we don’t really know which table you would want to update. However, we do have enough info to ask the user which table they’d like the Insert, Update and Delete statements created for. We would prompt the user with a dialog listing the tables within the query and once they choose one we would continue as we did above.
No promises as we still have lots of bugs and we really want to make sure we finish up enabling scenarios that are otherwise unachievable. With the above work around, we don’t see this as a ship killer, but it is one of my pet peeves and I hope we have time to fix it.
Data Design-Time for Client apps.
Allow the programmer to Select a group of fields from the various tables, give this set of fields a Name i.e myDataObject.
You should have the constraints -(if not they need to be defined) you can map the object to match the relations.
Select, Insert, Update , Delete should be as easy as
(all rights reseerved)