Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. How display data from DB by selecting from DropdownList

How display data from DB by selecting from DropdownList

Scheduled Pinned Locked Moved Visual Basic
databasehelpcsharpasp-net
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Praveen 123
    wrote on last edited by
    #1

    Sir, I am developing an application in ASP.NET.It's using a MS-Access database and I am listing ten Emp_IDs from the table Employee to DropdownList.I want to select particular Emp_Name from Employee table on click on DropdownList. Pleas help me to solve this problem.

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    J A 2 Replies Last reply
    0
    • P Praveen 123

      Sir, I am developing an application in ASP.NET.It's using a MS-Access database and I am listing ten Emp_IDs from the table Employee to DropdownList.I want to select particular Emp_Name from Employee table on click on DropdownList. Pleas help me to solve this problem.

      Praveen.K System Engineer Graviton Technologies Pvt.Ltd

      J Offline
      J Offline
      Johan Hakkesteegt
      wrote on last edited by
      #2

      Hi Praveen, You are actually asking the wrong people, this being the Visual Basic / VB.NET Q&A. But as the languages are similar, I suggest trying something like: Dim Emp_ID as string Dim MySqlSentence as string Emp_ID = DropdownList.SelectedItem MySqlSentence = "SELECT Emp_Name FROM Employee_table WHERE Emp_ID = " & Emp_ID Good luck, Johan

      My advice is free, and you may get what you paid for.

      1 Reply Last reply
      0
      • P Praveen 123

        Sir, I am developing an application in ASP.NET.It's using a MS-Access database and I am listing ten Emp_IDs from the table Employee to DropdownList.I want to select particular Emp_Name from Employee table on click on DropdownList. Pleas help me to solve this problem.

        Praveen.K System Engineer Graviton Technologies Pvt.Ltd

        A Offline
        A Offline
        Ahmed El Badry
        wrote on last edited by
        #3

        OleDbDataAdapter1.SelectCommand.CommandText = "select AID,name from Admin ORDER BY [AID]" OleDbDataAdapter1.Fill(DataSet21, "Admin") ComboBox1.DataSource = DataSet21.Tables("Admin") ComboBox1.DisplayMember = "name" ComboBox1.ValueMember = "AID" :rose:

        Ahmed El-Badry

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups