Click here to Skip to main content
15,916,945 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I am trying to connect to a remote SQL DB. When I create the connection in VS2008 Connection succeeds and produces the connection string for me. I can also preview the data.

This is my connection string:

strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Fact01a\\Fact01a,3789;Initial Catalog=Endcap_Swaps;Integrated Security=True"

For some reason everytime I try to Open(); the DB I recieve this error:

OleDBException was unhandled
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

The error code is 2147217887

I am not sure what else I should be checking here... any and all help/suggestions would be helpfull.
Thanks!
Posted

Are you sure you are using correct datasource?!

try this:
create a text file and change the extension from "txt" to "udl". then double click on it. select your provider (Microsoft OLEDB for SQL or something like this) and then enter the correct information for you sql server.
then check the "Allow Saving Password" and test your connection then click OK and close it.
Now try to open it with notepad. you can see the query string. use that one.
 
Share this answer
 
Sounds like a similar issue resolved here[^]. Have a look.

Also, have a look at this [^]link too.
 
Share this answer
 
Thanks guys!
I learned somehting new with the udl file creation and the links provided led me to realize that the connection I was making needed to be changed from OleDB to OdbC.
 
Share this answer
 
Comments
aidin Tajadod 10-Sep-10 13:07pm    
Hi RajXC, I have tried both OLEDB and ODBC. I had a windows service with a critical role and high trafic.I do not know why but ODBC was slower that OLEDB and some times buggy! I think using OLEDB is a better choice than ODBC unless you have to.
Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900