Sunday, May 22, 2011

Microsoft LightSwitch Database Wizard stopped working! Why?


Steve Hoag has covered a lot of ground in troubleshooting LightSwitch Beta 2 related problems. Still there are problems that may arise due to various interactions. This post is regarding one such problem.

What was the problem?

LightSwitch can source data not only from SQL Servers, SharePoint lists and WCF RIA Services but can also obtain its data from MySQL and Oracle albeit limited to certain versions. By installing the MySQL Connector (Connector/Net 6.3.6) from here  and executing the msi you can start seeing the MySQL Provider in the Change Data Source Window after the Connection Properties window  in LightSwitch. After which it is real easy.

Due to some corruption problems with the LightSwitch it was reinstalled which required reinstalling VS2010 SP1. After these changes it became clear that the Database Wizard on the reinstalled Beta 2 was broken (could not connect to any databases) as it came back with this error,











This was followed with this error,
Microsoft Visual Studio Message:
"An unexpected error occurred in the .NET Framework Data Provider for MySQL. Please contact the provider vendor to resolve this problem"
Now the Connection Properties Window does not show up anymore.

Solution:
I ran the msi file (mysql-connector-net-6.3.6.msi) once again choosing to repair. The operation completed but did not add the required DbProviderFactories entry in the machine.config file. The problem persisted.

Finally, I uninstalled the MySQL Connector and now the LightSwitch Database Wizard is happy and I see the Connection Properties Window popping-up. Of course to connect to MySQL Databases I will have to install the connector again.

2 comments:

AurtherX said...

Does this mean that I cannot connect lightswitch to MySQL until a patch or fix is made?

I mainly work with MySQL on my network and this is why I was interested in Lightswitch.

mysorian said...

After reinstalling the Microsoft LightSwitch Beta 2, if you reinstall the connector from the MySQL site it should work. Presently I have no use for MySQL and therefore I have not tried to rerun the connector msi.
Good Luck with your MySQL related activity. LightSwitch is a great product and in the RTM it will shine lot more.

DMCA.com Protection Status