Databases Reference
In-Depth Information
Console.WriteLine(
"'{0}' is at index {1} " +
"and its type is: {2}",
rdr.GetName(1),
rdr.GetOrdinal("contacttitle"),
rdr.GetFieldType(1));
rdr.Close();
}
catch(Exception e)
{
Console.WriteLine("Error Occurred: " + e);
}
finally
{
conn.Close();
}
}
}
}
3. Make ResultSetInfo the startup project, and run it by pressing Ctrl+F5. You should
see the results in Figure 12-4.
Figure 12-4. Displaying result set metadata
Search WWH ::




Custom Search