.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Articles >> .Net Framework >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Using Visual Studio .NET with DataSet

Posted By:Shashi Ray       Posted Date: November 29, 2009    Points: 25    Category: .Net Framework    URL: http://www.dotnetspark.com  


Using Visual Studio .NET with DataSet

To generate a strongly typed DataSet in Visual Studio .NET, right-click in the form designer window, and then

click Generate Dataset. This creates an .xsd (XML Schema Definition) file, as well as a class file, and then adds them to

your project. Be sure that one or more DataAdapters have been added to your Windows form before doing this. Note that the

class file is hidden. To see it, click the Show All Files button located in the toolbar of the Solution Explorer window. The

class file is associated with the .xsd file.


To add relations to a strongly typed DataSet , open the XML Schema Designer by double-clicking the schema file in the

Solution Explorer window, and then right-click the table to which you want to add a constraint. On the shortcut menu, click

Add New Relation.


An alternative method for generating a strongly typed DataSet in Visual Studio .NET is to right-click the project in the Project

Explorer, choose Add Files, and then select dataset. A new .xsd file will be created. From there you can use Server Explorer

to connect to a database and drag table(s) onto the xsd file.



Shashi Ray

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend