简体   繁体   中英

web.config changing from SQL Server to MySQL connection

We just completed programming aa 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.

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM