IfxConnection example

The following C# example shows how to use a constructor to set the connection string.
IfxConnection conn = new IfxConnection(
        "User Id=me;Password=myPassword;" +
        "Host=ajax;Server=myServer;" +
        "Service=9401;Database=superstores"
        );
IfxCommand cmd = new IfxCommand("select fname from customer", conn);
conn.Open();
IfxDataReader myReader = cmd.ExecuteReader();
while (myReader.Read())
{  
     Console.WriteLine("{0}", myReader.GetString(0));
}
myReader.Close();
myReader.Dispose();
cmd.Dispose();
conn.Close();
conn.Dispose();