- Using Visual Studio .NET IDE.
- Using XSD.exe (Using VS.Net command prompt)
Open VS.Net command prompt and Type XSD /? For the help on this exe.
Creating a Typed DataSet using Visual Studio .NET IDE
Let me explain a step by step procedure to create a Typed DataSet,
1. Open VS .Net IDE and Click on File -> New -> Project and Select Console Application.
2. Enter name for the project. Say TypedDataSetTest.
3. Right click on the solution and click on Add-> Add New Item will show a dialog box.
Select DataSet from templates pane, give the name (Say TypedDs.xsd) and click on Open. This will add file by name TypedDs.xsd to the solution.
4. Click on the Server Explorer browse to the database and drop the table on the TypedDs.xsd file.
If we check the xml file for the same then we can see the schema for the table.
This dataset can be used in the same manner as the normal dataset to get the data.
No comments:
Post a Comment