Thanks for this post, I have been attempting to convert DB to MySql to cut down on overheads.
I'm running into all sorts of errors, for example: The value cannot be null or an empty string (connectionString) but its not empty, and another problem with the Public Key Token when I amend my web.config file to the one for MySqlProvider on CodePlex website as you specified.
using EntLibContrib.Data.MySql; using EntLibContrib.Data.MySql.Properties; using MySql.Data.MySqlClient;
namespace NopSolutions.NopCommerce.Common.DAL { /// <summary> /// Data helper class /// </summary> public class NopDataHelper { #region Methods /// <summary> /// Creates a connection to a data soruce /// </summary> /// <returns>Database instance</returns> public static MySqlDatabase CreateConnection() { string strCon = "Data Source=localhost;Database=nopcommdb;User Id=root;Password=password;"; // PUT THIS HERE INCASE IT WAS NOT CONNECTING TO WEB.CONFIG MySqlDatabase db = new MySqlDatabase(strCon); return db; }
There are two release files, one with the binaries only and the other with the full source code. These release files are standard zip compressed files and need to be expanded into a temporary folder e.g. C:\TEMP
After downloading the binaries only release, copy the binaries to the Microsoft Patterns and Practices Enterprise Library installation folder (typically %ProgramFiles%\Microsoft Enterprise Library 4.1 - October 2008\Bin\). Note: These runtime extensions can be used with your code without first copying the files to the Enterprise Library installation folder if you wish, however any extensions to the Configuration Console (and Visual Studio integration) will not work until you do.
Full Source Code Release entlibcontrib2010-01-src.zip
After downloading the source release, to create the binaries you can run \Scripts\BuildAndCopyAssemblies.bat and copy the contents of the Enterprise Library Contrib \Bin\ folder to the Microsoft Patterns and Practices Enterprise Library installation directory (typically %ProgramFiles%\Microsoft Enterprise Library 4.1 - October 2008\Bin\). Note: These runtime extensions can be used with your code without first copying the files to the Enterprise Library installation folder if you wish, however any extensions to the Configuration Console (and Visual Studio integration) will not work until you do.
Installing Instrumentation
For both release files, to install instrumentation you will need to run \Scripts\InstallServices.bat.This will install Event Sources, Performance Counters and WMI containers. Note: if you are using Vista then you will need to run this as an Administrator.
I have now done everything you have said in the last post but still get the same error:
The value can not be null or an empty string. Parameter name: connectionString Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: The value can not be null or an empty string. Parameter name: connectionString
Source Error:
Line 35: { Line 36: #region Methods Line 37: /// <summary> Line 38: /// Creates a connection to a data soruce Line 39: /// </summary>
// MYSQL CONNECTOR using MySql.Data.MySqlClient; using MySql.Data.Types; using EntLibContrib.Data.MySql; using EntLibContrib.Data.MySql.Properties;
namespace NopSolutions.NopCommerce.Common.DAL { /// <summary> /// Data helper class /// </summary> public class NopDataHelper { #region Methods /// <summary> /// Creates a connection to a data soruce /// </summary> /// <returns>Database instance</returns> public static MySqlDatabase CreateConnection() { string strConnection = "Data Source=localhost;Database=nopcommdb;Uid=root;Pwd=aa4322aa;"; MySqlDatabase db = new MySqlDatabase(strConnection); return db; }
Am I right to leave NopConfig out fo the web.config, and bypass this altogether and just go direct to NopDataHelper.cs?
So it looks like some people are having success using MySql. Can someone provide a blank MySql database backup or scripts to create the MySql database for NopCommerce? If not, can someone provide some insight into converting the database from Sql Server to MySql?
I am working on the conversion, it seems like working fine so far but I am sure there are a lot of bugs still need to be caught. And I haven't started working on the XML data type conversion.
Feel free to share your experience with me whoever has succeed or not on the nopcommer mysql conversion.
I have managed to convert NopCommerce V1.50 to MySql, including the Database, but am having an issue with the NOP_splitstring_to_table Function called from Nop_ProductLoadAllPaged. I have tracked down where the error is occurring from Nop_ProductLoadAllPaged and it is this line:
SELECT CAST(v_FilteredSpecs AS SIGNED INTEGER) FROM NOP_splitstring_to_table(v_FilteredSpecs,',');
It is thie bit: (v_FilteredSpecs,',') that s causing the error.
Please help !!
Thanks in advance,
Paul.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.