public void select(String table) { OleDbCommand cmd; OleDbDataReader RS; using (OleDbConnection Connection = new OleDbConnection()) { Connection.ConnectionString = connectionstring; Connection.Open(); cmd = new OleDbCommand("SELECT * FROM " + table, Connection); RS = cmd.ExecuteReader(); while (RS.Read()) { Console.WriteLine(RS[0] + " " + RS[1]); } RS.Close(); } }