binding multiple comboboxes at form loadtime

renjivraman

Member
Joined
Sep 9, 2006
Messages
23
Location
India
Programming Experience
1-3
hi all im doin a project in which i have to use a form which contain a no of comboboxesall of these must be binded dynamically (from sql server db) during the form load event.i have done it with using a no of dataadpters and datasets,but i would love to know how can i do it in a more efficient way(that means using a single datadapter)i hope u guys can help me solving this ...love u allrenjiv
 
Last edited:
You should use a separate DataAdapter for each result set. If you only want a single result set then you just use one DataAdapter and bind the same data to each control but vary the DisplayMember. if you need multiple result sets then you should be using multiple DataAdapters. You could use a single DataAdapter with multiple queries in the SelectCommand if you're using a data source that supports it, but that is not the preferred method.


By the way, saying "from sql" means nothing. SQL is a language that basically all databases use. If you mean Microsoft SQL Server then you should say SQL Server so it's clear, because Access, Oracle, MySQL
and every other worthwhile database uses SQL as its language too.
 
Back
Top