在PDA上可以连接MySQL数据库吗?
我的开发环境是visual stuido .net 2003,用C#开发,也安装了MySQL的ADO.Net(Connector/Net)组件
,为什么在PDA上不能连接PC机器上的MySQL数据库呢?
具体代码如下:
String url = @"server=192.168.0.36;user id=root; password=aaa; database=test; pooling=false";
try
{
MySqlConnection con = new MySqlConnection(url);
MySqlCommand com= new MySqlCommand("select name from access",con);
con.Open();
MySqlDataReader dr = com.ExecuteReader();
if (dr.Read()) {
MessageBox.Show("aaa");
}
}catch(System.TypeLoadException exp) {
MessageBox.Show(exp.Message,"aa");
}
运行后报错误如下:
未处理的“System.TypeLoadException”类型的异常出现在 System.Windows.Forms.dll 中。