populate multiple combo boxes

Posted on 2008-11-11
Last Modified: 2013-12-17
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 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

Question by:skpas01
    LVL 8

    Expert Comment

    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?
    LVL 26

    Accepted Solution

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now