Manoj Kumar
Manoj Kumar

Reputation: 157

Multiple-step OLE DB operation generated errors. Check each OLE DB status value,

I'm trying to connect to an Access database from C#, but it's returning an error.

I'm trying to resolve by following this thread, but it is not working.

Can you tell me where I went wrong?

connection_string =@"Provider=Microsoft.ACE.OLEDB.12.0;Password=pass@word1;Location=C:\Users\manoj\Documents\manoj\Databases\college.accdb;Persist Security Info=True;";

The error is:

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

Upvotes: 1

Views: 2900

Answers (1)

Gord Thompson
Gord Thompson

Reputation: 123549

You are getting the error because Location= is not a valid parameter for an OLEDB connection string. You need to use Data Source= instead, as in

... ;Data Source=C:\Users\manoj\Documents\manoj\Databases\college.accdb; ...

Upvotes: 1

Related Questions