如何从XML模式创建SQL Server表模式?(使用.NET和Visual Studio 2008) [英] How to create SQL Server table schema from a XML schema? (with .NET and Visual Studio 2008)
问题描述
我有一个XML模式,并且我知道"xsd.exe"可以为其生成C#代码.但是我想知道是否有可能借助此工具或其他工具从XSD自动创建MS SQL Server 2005+表.
I have a XML schema, and I know that "xsd.exe" can generate the C# code for it. But I want to know if is possible to automatically create the MS SQL Server 2005+ tables from the XSD, with the help of this or other tools.
顺便说一句我不明白"xsd.exe"生成的C#代码值得什么.CodeXS和xsd.exe生成的代码有什么区别?
BTW I didn't get what the C# code generated by "xsd.exe" is worth for.
What's the difference between code generated by CodeXS and xsd.exe?
推荐答案
您可以使用XSD2DB实用程序
You can use the XSD2DB utility
这是示例xsd2db.exe -f true -l [服务器名称] -n [数据库名称] -s D:\ po.xsd -t sql
This is the Example xsd2db.exe -f true -l [Server Name] -n [Database Name] -s D:\po.xsd -t sql
帮助链接 http://xsd2db.sourceforge.net/
这篇关于如何从XML模式创建SQL Server表模式?(使用.NET和Visual Studio 2008)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!