K
KevinRug
In the code below, I am trying to change the select statment to be
"distinct" , ( i have also tried "top 1"), but when the code runs I always
get the original query "Select city from doctors".
Here is a code extract
SqlCommand cmdCities = new SqlCommand("Select city from doctors",
sqlConnection1);
SqlDataReader drCities;
sqlConnection1.Open();
drCities = cmdCities.ExecuteReader();
lstCities.DataSource = drCities;
lstCities.DataTextField = "City";
lstCities.DataBind();
drCities.Close();
sqlConnection1.Close();
Any ideas as to why the query changes are not being accepted?
Kevin Ruggles
"distinct" , ( i have also tried "top 1"), but when the code runs I always
get the original query "Select city from doctors".
Here is a code extract
SqlCommand cmdCities = new SqlCommand("Select city from doctors",
sqlConnection1);
SqlDataReader drCities;
sqlConnection1.Open();
drCities = cmdCities.ExecuteReader();
lstCities.DataSource = drCities;
lstCities.DataTextField = "City";
lstCities.DataBind();
drCities.Close();
sqlConnection1.Close();
Any ideas as to why the query changes are not being accepted?
Kevin Ruggles