关于ASP.NET的DataColumn对象的问题
string constr = ConfigurationManager.ConnectionStrings["constr"].ToString();
string comstr = "Select * From UserInfo";
SqlDataAdapter adapter = new SqlDataAdapter(comstr, constr);
ds = new DataSet();
DataColumn[] dc = new DataColumn[1];
adapter.Fill(ds);
dc[0] = ds.Tables[0].Columns[0];
ds.Tables[0].PrimaryKey = dc;