SQLXML Bulk Load connection string

bulk-load c# sqlbulkcopy sql-server sqlxml

Question

I import data from xml to the database using SQLXML Bulk Load. MS SQL Server 2008 performs well.

SQLXMLBULKLOADLib.SQLXMLBulkLoad4 objBL = new SQLXMLBULKLOADLib.SQLXMLBulkLoad4();
            objBL.ConnectionString = "Provider=sqloledb;server=server;database=databaseName;integrated security=SSPI";
            objBL.ErrorLogFile = "error.xml";
            objBL.KeepIdentity = false;
            objBL.Execute ("schema.xml","data.xml");

Then I construct a database using MS SQL Compact CE 3.5.tempDb.sdf and attempt to access this DB

objBL.ConnectionString = "Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5; database = D:\\project\\xmlread\\xmlread\\bin\\Debug\\tempDb.sdf;integrated security=SSPI";

Invalid connection string, though. How can we solve this?

1
0
3/18/2015 11:01:52 AM

Accepted Answer

using a connection string initiallydata source and Microsoft.SQLSERVER.CE.OLEDB.4.0 connection string is functional, therefore

objBL.ConnectionString = "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0; 
data source = D:\\project\\xmlread\\xmlread\\bin\\Debug\\tempDb.sdf;";

I then see the following message (on the execute method):

Bulkload will only work with SQL Server 2000 or later.

Therefore, I believe that MS SQL Compact CE does not support SQLXML 4.0.

0
3/27/2015 8:26:56 AM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow