SqlConnection conn=new SqlConnection("Server=local;uid=sa;pwd=pangyb;Database=northwind");
conn.Open();
SqlCommand commd=conn.CreateCommand();
CustomerID,CompanyName from Customers";
SqlDataReader thisreader=commd.ExecuteReader();
while(thisreader.Read())
{
Console.WriteLine("\t{0}\t{1}",
thisreader["CustomerID"],thisreader["CompanyName"]);
}
thisreader.Close();
conn.Close();