public void readEdgeTable(LocationNode graph, Location[] locArray) { command.CommandText = "select * from EdgeTable"; conn.Close(); conn.Open(); command.Connection = conn; OleDbDataReader reader = command.ExecuteReader(); while (reader.Read()) { graph.addEdge(Convert.ToInt32(reader[0]), Convert.ToInt32(reader[1]), locArray); } }