c# 与数据的菜鸟问题
麻烦学哥,学姐们帮帮菜鸟吧: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();
不知道哪儿错了!谢谢