我写了一段很简单的用ado.net连接数据库的代码,可是运行后提示没事可安装的ISAM!
这是什么意思?我该怎么做才能正常连接。
代码如下: static void Main(string[] args)
{
OleDbConnection thisConnection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;DataSource=Human.mdb"); thisConnection.Open(); OleDbCommand thisCommand = thisConnection.CreateCommand(); thisCommand.CommandText = "SELECT xm,xb FROM human"; OleDbDataReader thisReader = thisCommand.ExecuteReader(); while(thisReader .Read())
{
Console.WriteLine("\t{0}\t{1}",thisReader["xm"],thisReader ["xb"]);
}
thisReader.Close ();
thisConnection.Close(); Console .Write ("Program finished,press Enter/Return to continue:");
Console.ReadLine(); }
这是什么意思?我该怎么做才能正常连接。
代码如下: static void Main(string[] args)
{
OleDbConnection thisConnection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;DataSource=Human.mdb"); thisConnection.Open(); OleDbCommand thisCommand = thisConnection.CreateCommand(); thisCommand.CommandText = "SELECT xm,xb FROM human"; OleDbDataReader thisReader = thisCommand.ExecuteReader(); while(thisReader .Read())
{
Console.WriteLine("\t{0}\t{1}",thisReader["xm"],thisReader ["xb"]);
}
thisReader.Close ();
thisConnection.Close(); Console .Write ("Program finished,press Enter/Return to continue:");
Console.ReadLine(); }
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货