1

We just completed programming a a VB.NET Web Project connected to a SQL Server Database. The client is now requesting that we support an identical schema in MySQL as well. I tried making a simple switch of the connection string via but it is still trying to connect to the provider value of (providerName="MySql.Data.MySqlClient")

This did not work. Can someone tell me if we can do this via the web.config. I don't want to have to change code to support the different connections. We are also going to have to support Oracle databases in the future.

Thanks in advance for you help.

  • 1
    Unfortunately, I believe you are out of luck. MySQL connections are as different from SQL Server connections as they are from Oracle connections. You will probably end up rewriting your data access layer to toggle between database types depending on where your project is deployed. :( – MadHenchbot Nov 02 '12 at 21:31

1 Answers1

0

If you didn't write the code to be DB agnostic, it's not this easy.

See this question for details and helpful links. Keeping an application database agnostic (ADO.NET vs encapsulating DB logic)

Community
  • 1
  • 1
Nikki9696
  • 6,260
  • 1
  • 28
  • 23