xsd 架构文件必须在 SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class 中进行注释?
这是一个使用 SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class 的示例 -
[STAThread]
static void Main(string[] args)
{
try
{
SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class objBL = new SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class();
objBL.ConnectionString = "Provider=sqloledb;server=server;database=databaseName;integrated security=SSPI";
objBL.ErrorLogFile = "error.xml";
objBL.KeepIdentity = false;
objBL.Execute ("schema.xml","data.xml");
}
catch(Exception e)
{
Console.WriteLine(e.ToString());
}
}
似乎 schema.xml 必须用 sql 信息注释才能成功导入。常规 xsd 文件不起作用。
有没有什么工具或方法可以自动生成基于xsd文件的注释信息?我无法通过互联网搜索找到任何内容。我想知道 SSIS 如何实现这一目标。是否有任何组件可以执行此操作,以便我可以将其包含在我的 .NET 应用程序中?
Here is an example to use SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class -
[STAThread]
static void Main(string[] args)
{
try
{
SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class objBL = new SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class();
objBL.ConnectionString = "Provider=sqloledb;server=server;database=databaseName;integrated security=SSPI";
objBL.ErrorLogFile = "error.xml";
objBL.KeepIdentity = false;
objBL.Execute ("schema.xml","data.xml");
}
catch(Exception e)
{
Console.WriteLine(e.ToString());
}
}
It seems that schema.xml must be annotated with sql information to make importing successful. Regular xsd file does not work.
Is there any tools or ways to automate the generation of annotate information basing on xsd file? I could not find any through Internet Search. I wonder how SSIS can achieve this. Is there any component doing this so I can include it in my .NET application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,我不相信有,据我所知,你必须手动添加这些东西。不过,好处是,只要你不遇到任何奇怪的问题,这并不太困难。
如果您发布您的 XSD 和表格结构,也许我可以帮助您。
Unfortunately I don't believe there is, you have to add these things manually, as far as I'm aware. The upside is that it isn't too difficult, though, providing you don't hit any weird hiccups.
If you post your XSD and table structure maybe I can give you a hand.