Install first
To use SQL in C #, you have to install
Microsoft SQL Server Compact 4.0
: http://www.microsoft.com/zh-cn/download/details.aspx?id=17876
To reference in the project
Otherwise, the following error will be compiled
the requested. NET Framework Data Provider could not be found. may not be installed
And then we're going to C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
Find this label <system.data>
<DbProviderFactories>
Then add the following code
<add name= "SqlClient data Provider" invariant= "System.Data.SqlClient" description= ". Net Framework Data Provider for SQL Server "Type=" System.Data.SqlClient.SqlClientFactory, System.Data, version=2.0.0.0, Culture=neutral, publickeytoken=b77a5c561934e089 "/>
<add name= "MySQL data Provider" invariant= "MySql.Data.MySqlClient" description= ". Net Framework Data Provider for MySQL "Type=" MySql.Data.MySqlClient.MySqlClientFactory, Mysql.data, version=5.0.2.0, Culture=neutral, Publickeytoken=c5687fc88969c44d "/>
Using mysql-installer-community in Photon