Newbie Combo Questions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am very new to vb.net and I have been attempting to work with a sql database.
I have genereated a dataform that returns all the records I have. So far so
Good.
I Want to use combo boxes to limit selection. ive added combo boxes and
linked them to the database using the Collection() list. That works and I can
update and add from this list. Question: will this hurt my project in the
future or is it better than linking it to a table? Second Question. After I
screwed up the combo box I deleted them and the code bringing it to the same
state as before the boxes were added, but the data no longer loads when i
test it. What causes this and how do you fix it?

Thanks
 
TennFox,

When it is only a combobox which uses the "Text" part there is nothing wrong
with using a IList for the combobox. The combobox item collection is self an
IList collection.

However do you want to use the value part as well, than is the answer, that
I've seen a lot of people who wanting to add something else to a combobox
than a datatable (or anything that references to that). Sooner or later I
saw them using the datatable. The datatable is just a complete build in
dotNet collection that fits exactly to this.

For your second I think it is better to show us some code. Although better
just with a datatable, otherwise someone has first to investigate your
class, what I (because of the given answers) seldom see that people like
that.

I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top