Sql server:
using (SqlConnection con = new SqlConnection(connectionString))
{
con.Open();
using (SqlCommand com = new SqlCommand("SELECT * FROM Customers ORDER BY Year(date), Month(date), Day(date)", con))
{
SqlDataReader r = com.ExecuteReader();
while (r.Read())
{
Console.WriteLine("{0}:{1}:{2}", r["Customer"], r["date"], r["Value"]);
}
}
(You can get the connection string by looking at the Server Explorer in VS, highlighting the database and looking in the properties pane).
For Access, use OleDBConnection instead of SqlConnection and so forth.