February 2003
Intermediate to advanced
752 pages
16h 35m
English
As I mentioned earlier, the DataSet is invaluable when you need to share data with a non-.NET client. Almost every modern programming language can parse an XML document, making XML an ideal way to exchange shared data. Best of all, the DataSet exports data seamlessly to XML. That means you don’t need to write any conversion code.
To create a simple test, we’ll save the DataSet to a file using its built-in WriteXml method. (You also can save the XSD schema using the WriteXmlSchema method.)
Dim DB As New CustomerDB()
Dim ds As DataSet = DB.GetCustomers()
ds.WriteXml("c:\customers.xml")The default representation uses a DataSet document tag, which contains <Customer> tags for every row in the Customers table. The ...
Read now
Unlock full access