public void ReadMyData(string myConnString)
{
string mySelectQuery = "SELECT ID, Name FROM Email";
ExactTargetConnection exactTargetConnection = new ExactTargetConnection(myConnString);
ExactTargetCommand exactTargetCommand = new ExactTargetCommand(mySelectQuery,exactTargetConnection);
exactTargetConnection.Open();
ExactTargetDataReader exactTargetReader = exactTargetCommand.ExecuteReader();
try
{
while (exactTargetReader.Read())
{
Console.WriteLine(exactTargetReader.GetInt32(0).ToString() + ", " + exactTargetReader.GetString(1));
}
}
finally
{
// always call Close when done reading.
exactTargetReader.Close();
// always call Close when done reading.
exactTargetConnection.Close();
}
}