Question

I would like to thank anyone with input on this ahead of time. I developed a program which uses SQLXMLBulkLoad4 class in order to bulk load a xml file to a staging table and then use a stored procedure to update the production table with this data. Here is where we are at a loss. All worked extremely well on my development computer, however, after moving all necessary items and insalling/registering the correct .dll files to the production server, I am getting a Fatal error in the SqlBulkLoad Error Log. Here is the text of the log (in xml):

 <?xml version="1.0"?>
 <Result State="FAILED">
    <Error>
        <HResult>0x80040154I32</HResult>
        <Description><![CDATA[Invalid connection string.]]></Description>
        <Source>XML BulkLoad for SQL Server</Source>
        <Type>FATAL</Type>
    </Error>
</Result>

I am not understanding while all of a sudden this error is appearing. I have experimented with different connection string types, to no avail. It is my understanding that using the SqlXmlBulkLoad4 class called for an OLEDB Connection string. Here is an example of my connection string for the SQLXMLBulkLoad:

<add key="ServerNameBulkLoad" value="Provider=SQLNCLI10;Server=ServerName;Database=DBName;Trusted_Connection=Yes;"/>

I have also tried manually registering the sqloledb.dll on the server again.

Any suggestions?

Was it helpful?

Solution

Alright, after testing a bunch of connection strings out (thanks www.connectionstrings.com) I finally found the solution to my problem, and it was in fact the connection string. The correct connection string (for utilization on the production server) is same as above, except Provider=SQLOLEDB.1 instead of SQLNCLI10. I believe this has to do with the server that the program is running off of being of, well, let's just say older statute. None the less, problem solved. Thanks RGI for your help!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top