My newest book arrived: Visual C# .NET 2003 Developer's Cookbook
Chapter 6 - Data Access and ObjectSpaces

Whidbey Typed DataSet

The new typed dataset designer with Whidbey automatically adds table relations to the typed dataset if you drag tables from the solution explorer. It's no longer necessary to add the relations manually to the designer.

Another feature of the typed dataset is that the generated class implements the new interface System.ComponentModel.IDataLoader. This new interface defines 2 methods: LoadData and SaveData. With LoadData it is possible to get the data from the database without creating a SqlConnection and SqlDataAdapter.

SaveData is not implemented with the alpha bits.



Feed You can follow this conversation by subscribing to the comment feed for this post.


Ok typed dataset guru...I'm trying out the typed dataset, pulling it down from a webservice to populate a crystal report. I do it against my test webservice, very nice. Then I move it over to the live service. Client code won't compile anymore, because it thinks the new dataset is a totally different type, and it won't convert between them, even though they are same name, same definition. They come from different services, so .net thinks they're incompatible types. This rather complicates my deployment, since I have to modify code to use the live type instead of the test type. Any way around this mess? Other than for crystal which requires it, this sorta killed my typed dataset love. Feel free to ignore this pathetic offtopic whine :)


Dennis, Scott Seely has an article about sharing types across web services: I hope this helps.

Paul Laudeman

Dennis - I have solved this problem once upon a time, in a beta long, long ago - could you post a small project to reproduce this problem? I think I could figure it out for you fairly quickly if I got my hands dirty with it again (see my blog for contact details).


great but does the implemented databindinding take care of the relations and especially the constraints. i mean can i present an userfriendly message if an foreign key-expression is thrown? if not all this is nice but not usable...


Deebee, Creating relations and constraints with datasets is not new with .NET 2.0. Just the designer creates the relations automatic. And yes, you can present a user-friendly error message.


Thanks much for the offer, Paul, but it looks like the MSDN article Christian posted is what I need...thanks Christian! What a pain in the neck, though...if a developer sets two webservices to the same namespace, the environment should trust that they're the same, imho.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)