日期:2014-05-18 浏览次数:20934 次
string m_strConnectionString = "Data Source=" + AppDomain.CurrentDomain.SetupInformation.ApplicationBase + @"stations.dat"; SQLiteConnection conn = new SQLiteConnection(m_strConnectionString); conn.Open(); string sql = "select * from citys"; SQLiteCommand cmd = new SQLiteCommand(sql,conn); cmd.ExecuteReader(); SQLiteDataReader sda = cmd.ExecuteReader();//这里报错DataReader already active on this command while(sda.Read()) { sda["name"].ToString(); }