Results 1 to 2 of 2

Thread: populatinb combo box at runtime

  1. #1

    Default populatinb combo box at runtime

    [Thursday, January 20, 2005 8:24 AM]

    hello folks,
    My Requirement:

    I want to have an combo box and it should get the list of sql servers that
    is installed on the network..or on the machine..

    The Process i have done:

    I wrote a function , that intially list out the MSSQL server
    installed..later it takes the server name from the sb5..which the user
    enteres..It verifies with this list and returns one or zero
    accordingly...based on this return value..I will have loop and asks for the
    user to enter a correct sql server name..I have succeded in this..

    CALLTHISFUNCTION1 FUNCTION(server)
    CODE
    open (window1)
    ?osqlApp{Prop:Create}='SQLDMO.Application'
    onames = ?osqlApp{'ListAvailableSQLServers()'}
    Loop i=1 To ?osqlApp{onames&'.Count()'}
    ServerQ.Name = ?osqlApp{onames&'.Item('&i&')'}
    add(Serverq)
    !message(server)
    !message(serverq)
    IF Serverq=server THEN
    return 1
    end
    End

    At this point..my requirement is ...I want to have an combo box and this
    combo box should get filled up the datas(servers installed in the
    network)returned from the clarion that is the dll in run time.Is that
    possible.

    or do you have anyother method with using the dll to get this work
    done.Please do help me. if not atleast tell me how to queue up or populate
    the combo box at runtime.

    Regards,
    padma

  2. #2

    Default Re: populatinb combo box at runtime

    [Thursday, January 20, 2005 11:45 AM]

    Hi Padma,

    No problem ;-)

    1. Please add a variable (e.g. %SERVERLIST%) using Set Variable...
    2. Please add another variable (e.g. %SERVERLISTID%) using Set
    Variable...
    3. Add your Combo Box dialog
    4. Add the %SERVERLIST% variable to the "Combo Box Text ID" field
    (Combo Box Dialog Properties -> Advanced Tab).
    5. Add the %SERVERLISTID% variable to the "Store Selection Results
    in Variable" field (Combo Box Dialog Properties -> Advanced Tab).

    You can call your DLL before displaying the dialogs (or before
    displaying the Combo Box) and pass the list of detected servers
    back to the %SERVERLIST% variable. Please use the following form:

    |Server1|Server2|Server3|etc.

    This will be displayed in the Combo Box as:

    Server1
    Server2
    Server3
    etc.

    If the user selects Server2, the %SERVERLISTID% variable is set to 2

    Now you can use the "Get List Item" function (String Function) to get
    the selected server name.

    Use the following (String Functions)

    Variable : %MYRESULT%
    Function : Get Item List - Get item X from string list
    String : %SERVERLIST%
    Search String: (empty)
    X : %SERVERLISTID%
    Y : (empty)

    The variable %BYRESULT% contains the selected server name now.

    Does this help?

    Friedrich


    --
    Friedrich Linder
    www.lindersoft.com
    Fax: 1.954.252.3910

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. SetupBuilder 5.5 Developer Edition is released!
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 13
    Last Post: 08-30-2006, 12:09 AM
  2. SetupBuilder 5.5 Developer Edition is released!
    By linder in forum Lindersoft Announcements
    Replies: 0
    Last Post: 08-14-2006, 04:36 AM
  3. SB5 Pro Runtime Error
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 11
    Last Post: 09-06-2005, 12:08 AM
  4. Assignment of Shortcut Icons at runtime
    By gspillane in forum SetupBuilder
    Replies: 0
    Last Post: 10-13-2004, 08:58 PM
  5. Combo box in SB5?
    By Unregistered in forum SetupBuilder
    Replies: 0
    Last Post: 06-10-2004, 03:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •