开发者

Can I create a dataset XSD without using the designer?

开发者 https://www.devze.com 2022-12-25 12:53 出处:网络
I want to be able to create the XSD file for my typed dataset without using the visual studio dataset designer. Is there a way to do this using for instance a command-line tool?

I want to be able to create the XSD file for my typed dataset without using the visual studio dataset designer. Is there a way to do this using for instance a command-line tool? There is 开发者_StackOverflow中文版some magic happening when a table is dragged from the server explorer to the design surface, but where does that magic come from?

To add some flavour to the mix, I am using DB2 LUW 9.1, but I am guessing that the process is similar using other database vendors.

Once I have the XSD I can use XSD.exe to create my .CS class, no problem.

Thanks for any help or suggestion!

/Per


If you have data in XML format that corresponds to your database tables, XSD.exe can be used to infer a schema from them directly.

Otherwise, if you just have your database and you want to generate both the classes and the XSD file from it, you can maybe do something like this: HOW TO: Write an XSD Schema From a Database using a DataSet.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号