OLE DB ASP.NET 2.0 MySQLProv provider with connection.open gives error -2147467259 - No error message available, result code: E_FAIL(0x80004005).

Posted on 2007-10-16
Medium Priority
Last Modified: 2013-12-17
ASP.NET 2.0 running on an xp workstation with the latest of the MySQLProv installed.
trying to access a MySQL  database on a windows server 2000
By using an oLEDB connection with MySQLProv installed on workstation..

connectionString="location=server_name;data source=db_name;Provider=MySQLProv;uid=usern_name;password=pwd;port=3306;

Receive the error below when I do a .open on the olebd connection object.

-2147467259 - No error message available, result code: E_FAIL(0x80004005).

Any help to use OLE DB *not* odbc would be greatly appreciated....

                using (OleDbConnection oleCon = new OleDbConnection(sConnect))
                    oleCon.Open();  <---- throws the exception
                    using (OleDbCommand comAdmin = new OleDbCommand(sSQL, oleCon))
                        OleDbDataReader dr = comAdmin.ExecuteReader();
                        if (!dr.HasRows)
                            lblMsg.Text = "Password is incorrect.  Please try again";
            catch (OleDbException oExecption)
                lblMsg.Text = oExecption.ErrorCode + " - " + oExecption.Message;
Question by:angelalaw
LVL 22

Expert Comment

ID: 20089828
Do you have read/write permissions for the DB, and containing folder?

Looks like a permissions issue.


Author Comment

ID: 20090337
Hi RedKelvin,

I understand your point... But wouldn't it be able to read regardless of the permissions?  it is not requesting a specific file like in Microsoft Access.  Rather it is looking to the server to find the MySql service to access a database given.

Aside from that right now they use TOAD to hand edit the database and I am building a web app so non-techie people can do the edits for the intranet..And they have no problem doing this.  And again TOAD does not asking for a specific file (like with Access) rather it is looking for the MYSQL Service to link to, inorder to gain access...

Any other thoughts...I have to give a qoute on work....but it is difficult if I don't know if I am going to have to rebuild from scratch or if I can simply use the existing database...

Yours in deepest gratitude,

Angela Law
LVL 22

Expert Comment

ID: 20090410
Ensure that your username and password are correct.

Is the db on the same server as the app, wondering if it may be a firewall/port issue
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  


Expert Comment

ID: 20090760
I'd have to agree with RedKelvin, this looks like the connection is never established to begin with.  Is the service is "discoverable" from the server running your web app?  This may point to connection issues like firewalls, port filtering, or even the database answering on a non-standard port.  If it is, then you can start tracking down an authentication issue (security context, any impersonation, etc.), but from the error I'd guess it's not making it that far.
LVL 15

Expert Comment

ID: 20091598
See this related thread but with Microsoft Access:


Author Comment

ID: 20092265
Hi everyone,

Thank you for taking the time to reply.  However, what i said in my last email was correct.

The answer is the MySQLProv driver I downloaded, I do not think it works atleast with .NET 2.0....

So, I went to Cherry City Software


Downloaded and installed their driver.

And it worked right off the bat...Plus it had examples and very good documentation...

So, it just looks like the MySQLProv driver is not compatible with .NET 2.0...

Thanks again for you taking the time to try and help me figure this out....


Angela Law

Accepted Solution

Computer101 earned 0 total points
ID: 20295281
PAQed with points refunded (500)

EE Admin

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question