Hi all,
I understand that there are quite a few requests for using MySQL with DNN...
I also understand that no-one has made a Data Provider for DNN that can use MySQL as a DBMS...
Now I KNOW that there will be licensing issues by creating one that uses the MySQL Connector/Net by MySQL AB - but that is because it gets linked hard to the binary...
Why not make a generic Data Provider that implements IDataAdapter, IDbConnection, IDbCommand, IDataAdapter and IDataReader as a factory that instantiates these using string from Web.config->appSettings?
I did some small testing and found that it is quite possible using Activator.CreateInstance and this does not have to be such a poor performance issue if maintained properly in a connection pool that reuses the objects.
Also the DataSet wraps nicely around these interfaces, so I did find it to be most valuable...
Now I haven't even downloaded DNN yet (the tests were for my own use), so I don't know if there are any special architecture that prohibits the use of interfaces in DNN - You tell me?
Hint: I found that if I need to utilize SQL Server as well as MySQL I needed to configure the SQL Parameter Prefix to be able to use the parameterized commands - but hey that's just an entry in Web.config called SQLParameterPrefix that can be set to @ for SQL Server and ? for MySQL.
Why hasn't this been done?
Cheers,
Dennis P