Skip to main content
March 23, 2007
Question

Connecting mySQL with ASP.NET

  • March 23, 2007
  • 2 replies
  • 441 views
I have an existing application, written in ASP.NET/C# with Dreamweaver, and using MS Access as the database.

However, I now wish to upsize the database to mySQL - but I can't figure out how to connect to it with Dreamweaver. All the help seems to be centred around using PHP/mySQL - but it would be a royal pain in the butt to have to rewrite the whole of my application in PHP!

I tried the following connection stuff in the web.config file:

<add key="MM_CONNECTION_STRING_myConnection" value="Provider=MySQLProv;Data Source=myDatabase;User Id=myUserName; Password=myPassword;" />
<add key="MM_CONNECTION_DATABASETYPE_myConnection" value="OleDb" />

But nothing seems to work! The application falls over with the following error:

System.InvalidOperationException: The 'MySQLProv' provider is not registered on the local machine. ---> System.Data.OleDb.OleDbException: No error information available: REGDB_E_CLASSNOTREG(0x80040154).
--- End of inner exception stack trace ---
at System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr)
at System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString constr)
at System.Data.OleDb.OleDbConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()

Any help would be greatly appreciatied (a new tutorial would be even better!)
And if it can't be done, I'd like to know that also, as I won't waste any more of my time searching for a solution.
Thanks

Caz Mockett
This topic has been closed for replies.

2 replies

Inspiring
March 23, 2007
You'll need to dowload and install myOLEDB for the mySQL website.

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004



Inspiring
March 23, 2007
> But nothing seems to work! The application falls over with the following
> error:

The first google result for that error might shed some light:

http://www.dotnet247.com/247reference/msgs/39/196594.aspx

Also, if your host supports asp.net, they likely offer MSSQL as well. If you
can't get MySQL working, maybe just switch to MSSQL.

-Darrel