开发者

xsd schema file must be annotated in SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class?

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?


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜