SQL XML Bulk load
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Does anyone has a working example of XMLSQLBulkLoad from C#? I have a dataset in C# which I am converting into XML and XSD as below
m_dsExcel.WriteXml(path+ "\\RuchiT.xml"); m_dsExcel.WriteXmlSchema(path+ "\\RuchiS.xml");
Then I am making connection to SQL server as below, but nothing seems to be inserted in SQL tableSQLXMLBulkLoad3Class bulkLoad = new SQLXMLBulkLoad3Class(); bulkLoad.ConnectionString = "PROVIDER=sqloledb;SERVER=servername;database=dbName;INTEGRATED SECURITY=sspi;"; ; bulkLoad.Transaction = false; bulkLoad.BulkLoad = true; bulkLoad.SchemaGen = true; bulkLoad.KeepIdentity = true; bulkLoad.Execute(RuchiS.xml, RuchiT.xml);
Any clues???? Appreciate you help. Thanks Ruchi