Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
4.67/5 (2 votes)
See more:
I have a case where I have .xsd files that I want to use with the Dataset object in VB 2010.

Can I use an .xsd file to create the column definitions for the DataTable object?

I am trying to avoid re-typing all the column data and the risk of error doing so.

Thanks.

Murray
Posted

1 solution

Yes.
DataSet and DataTable both include ReadXmlSchema and WriteXmlSchema methods (in a variety of overloads).
Google and MSDN will find them for you, but:
DataTable.ReadXmlSchma[^]
DataSet.ReadXmlSchema[^]
 
Share this answer
 
Comments
dg6yhw11 19-Jul-13 14:46pm    
That's perfect. I couldn't find it in the Help.
Thank you.
OriginalGriff 19-Jul-13 14:53pm    
The VS F1 Help is...um...let's be polite, and call it useless, shall we? :laugh:
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900