SQLXML Bulk Load connection string

bulk-load c# sqlbulkcopy sql-server sqlxml

Question

I use SQLXML Bulk Load to import data from xml to DB. With MS Sql Server 2008 works great.

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 create MS SQL Compact CE 3.5 database - tempDb.sdf and try to connect to this DB

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

But have - Invalid connection string. How to fix this?

Accepted Answer

At first in connection string using data source and Microsoft.SQLSERVER.CE.OLEDB.4.0, so connection string work -

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

But then i see this message (on execute method) -

Bulkload will only work with SQL Server 2000 or later.

So I think that SQLXML 4.0 not supported ms sql compact ce



Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why