Re: SqlCommand SQL statement 'stuck'
- From: "Alex Passos" <bz@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 13 Apr 2005 14:49:53 -0500
SELECT distinct city from doctors.
Try it.
Alex
"KevinRug" <kevinrug@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:OxqM97FQFHA.2932@xxxxxxxxxxxxxxxxxxxxxxx
> 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
>
>
.
- References:
- SqlCommand SQL statement 'stuck'
- From: KevinRug
- SqlCommand SQL statement 'stuck'
- Prev by Date: Re: How to look at parameter string
- Next by Date: Re: SqlCommand SQL statement 'stuck'
- Previous by thread: Re: SqlCommand SQL statement 'stuck'
- Next by thread: Re: SqlCommand SQL statement 'stuck' << fixed>>
- Index(es):