我可以在不使用设计器的情况下创建数据集 XSD 吗?
我希望能够在不使用 Visual Studio 数据集设计器的情况下为我的类型化数据集创建 XSD 文件。有没有办法使用例如命令行工具来执行此操作? 当将表从服务器资源管理器拖到设计界面时,会发生一些神奇的事情,但是这种神奇的效果从何而来呢?
为了给混合添加一些风味,我使用 DB2 LUW 9.1,但我猜测使用其他数据库供应商的过程是类似的。
一旦我有了 XSD,我就可以使用 XSD.exe 创建我的 .CS 类,没问题。
感谢您的任何帮助或建议!
/每
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 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有与数据库表对应的 XML 格式的数据,则可以使用 XSD.exe 直接从中推断架构。
否则,如果您只有数据库并且想要从中生成类和 XSD 文件,您可以执行以下操作: 如何:使用数据集从数据库写入 XSD 架构。
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.