Solution for OLE DB provider connecting to SQL Server giving error “Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done”
Posted by jpluimers on 2010/10/19
Recently, I had the error message “Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done” occur to me when connecting through the “Microsoft OLE DB Provider for SQL Server”.
I got the below message (in this case in Delphi, but I have seen lots of other people having the same issue using other environments too):
—————————
Error
—————————
Error connecting to the database!
Database name: “Provider=”SQLOLEDB.1″;Persist Security Info=”False”;Integrated Security=”True”;Initial Catalog=”MyDatabase”;Data Source=”.\SQLEXPRESS””
Class: EOleException
Message: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
Source: Provider
HelpFile:—————————
OK
—————————
In fact though the ADO.NET provider for SQL Server documentation indicates that for “Integrated Security“, the value true is equivalent for SSPI, for OLE DB this is not the case.
So:
When using the Microsoft OLE DB Provider for SQL Server (aka SQLODEDB.1), and you use Integrated Security, make sure you specify SSPI as the value.
Bad connection string:
Provider=SQLOLEDB.1;Integrated Security=True;Persist Security Info=False;Initial Catalog=MyDatabase;Data Source=.\SQLEXPRESS
Good connection string:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDatabase;Data Source=.\SQLEXPRESS
Hope this helps a few people.
–jeroen






megha said
hello i am getting the same error but i am using ms access as my database..
Pls help..
jpluimers said
I’m not familiar with connection strings for Microsoft Access. But those are what you should be checking first.
José Pablo said
I have the same problem using visual basic 6.0, when I use integrated security = SSPI all works fine, but I need use a specify user for this work, and I need use integrated security =”false”, with that I get this error
Can anyone help?
jpluimers said
Not sure, as I don’t use VB6.
In .NET it works if you set
Integrated Security=falseand givePasswordandUser IDa proper value.Frankie Espinoza said
Hi dude,
i read your blog,This is a wonderful blog.I was able to get the
information that I had been looking for.
Thanks once again.
http://frankieespinoza.weebly.com/delphi-consulting.html