Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dataset

Status
Not open for further replies.

balajee

Programmer
Jun 29, 2000
134
NZ
Hi

I am new to VB .net. I was studying one of the sample solution downloaded from microsoft site : How to - Typed Dataset. After opening the solution, in the solution explorer I see an entry "northwind.xsd". In the designer there is no data adapter or dataset. From where did this "northwind.xsd" came?

Thanks
 
"XSD" stands for Xml Schema Definition - It's a file that contains the structure of a dataset, but not the actual data. Although I've never tried it, I assume it could be created programmatically. I generally use them to store the structure of the data that I'm using so I can create a report from it. You can create a generic dataset in the form editor and call it "Strongly Typed", which means that it uses a file like this to define its structure.
 
To genereate an XSD from code, I believe it is:

DataSet.WriteXMLSchema("filename")
 
You're exactly right, RiverGuy... but this is going the other direction. The Northwind setup seems to be available as an XSD file, so that you can set up a dataset that would work with it.

When you add a "Dataset" control to your form, you'll get a wizard window that gives you the option of "Untyped" or "Strongly Typed". Untyped means that you can define this dataset's structure as you go... good if you're generating something. If you're pulling from a database, you can use the .xsd file to create a "Strongly Typed" dataset that already has the same structure as the database, then pull it in directly. It makes life so much easier when you're reading databases...


Ben
 
But there is no such code for "northwind.xsd" in this example. I mean in the visual basic. I can double click and see the html code(xml) for this xsd file. but then the example does not say that the dataset has been generated by using xml.
 
The code that uses the XSD file can be found in the AutoGeneratedCode portion of the form. The IDE genereated the file however.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top