I've been trying for the last few days to get an XMLBulkLoader working in C#.NET, code below [STAThread]
private void btnLoadXML_Click(object sender, EventArgs e)
SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class objXBL = new SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class();
objXBL.ConnectionString = @"Provider=sqloledb;server=DUBW00000243\SQL2005;database=SepaDD;User ID='tony';Password='metallica'";
objXBL.ErrorLogFile = "XMLError.log";
objXBL.KeepIdentity = false;
It's throwing back at error at the following line - objXBL.Execute(@"C:\xml\SampleSchema.xsd", @"C:\xml\SampleXMLData.xml");
I've been reading a lot about specifying STAThread as C# uses Multi threading by default as opposed to VB which uses Single Threading by default. This is not making any difference for me. I've got a simple XML / XSD and I want this to load the data from my sample xml data file into the database...
Can anyone help, please?
Thanks in advance
View Complete Post