If you are using the 1.1 framework
if(dr.HasRows){
combobox.Items.Add(dr.Getxxx());
}
else{combobox.Items.Add("No Records Here");}
If you aren't, you can set a flag which is set to false and gets set to true
within the dr.Read()...it's it's false when you get out of the loop, Add
some other text to indicate that there's nothing there.
"Massy" <an*******@discussions.microsoft.com> wrote in message
news:7D**********************************@microsof t.com...
Hi,
I am using a datareader to retrieve values from my database and fill a
combobox. Can anyone tell me how i would display a message in the combobox
if no results are returned. At the moment i just get a blank combobox which
may be confusing to the user.
Many thx