Adding info from a database into a combo box

Discussion in 'Visual Basic ( VB )' started by bouki, Mar 13, 2011.

  1. bouki

    bouki New Member

    Joined:
    Apr 9, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    This code is correct...
    Code:
    Do While rdr.Read
                issuebook.cbmember.Items.Add(rdr.Item("FName"))
    Loop
    

    Suppose i want to add both last and first name..I tried this but getting a error
    Code:
     
    Do While rdr.Read
                issuebook.cbmember.Items.Add(rdr.Item("FName" & " " & "LName"))
    Loop
    
     
  2. virxen

    virxen New Member

    Joined:
    Nov 24, 2009
    Messages:
    387
    Likes Received:
    90
    Trophy Points:
    0
    Code:
    
    rdr.Item("FName" )& " " & rdr.Item("LName")
    
     
  3. ManzZup

    ManzZup New Member

    Joined:
    May 9, 2009
    Messages:
    278
    Likes Received:
    43
    Trophy Points:
    0
    Occupation:
    Production Manager:Software @ ZONTEK
    Location:
    Sri Lanka
    Home Page:
    http://zontek.zzl.org
    for a combobox you can specify the data source if the database connection is established corectly
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice