[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 286
  • Last Modified:

populate multiple combo boxes

i have ten combo boxes in a form. they have to be populated woth values from database.
I am using sql.i have a storeproc to get data but it has a parameter called combotype, which takes
the name of combo and fetches the result,so thisgoes on for the next nine combos.so for each
combo i am making a call to database because of which it is taking more time to populate them
so can any one tell me how can i populate multiple combo boxes with a single call to the database.
Note that to populate all the combos we use sane storeproc which has 4 params: ID,Combotype,Returnstatus,returntext

0
skpas01
Asked:
skpas01
1 Solution
 
rpkhareCommented:
Do you want to populate all the combo boxes with the same set of values? Which column of the query you are filling in the Combo Box?
0
 
Anurag ThakurCommented:
make sure that your stored procedure returns 10 different tables back - in the single db call - in the dataset and each table contains the data which needs to be bound in the each combobox -

assuming that you have got the result set (10 tables) then you can do a databind for the combo with different table in the dataset and do a databind and thus you can get your result set in a single db call
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Tackle projects and never again get stuck behind a technical roadblock.
Join Now