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. Find and Bind Data From MDB.

Find and Bind Data From MDB.

Scheduled Pinned Locked Moved Visual Basic
databasealgorithmshelptutorial
3 Posts 2 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.
  • N Offline
    N Offline
    NANCO
    wrote on last edited by
    #1

    Hi! again. can anyone tell me how to find a specific data Like Name by using ID from a Microsoft Data Base(MS ACCESS DATABASE).(I'm Using Microsoft Visual Basic 2005 Express Edition) Ex: ID Name 01 John 02 Smith I want the Name of the specific ID to come into a textbox. (If I say Find "01" then John Should Be loaded into Textbox1) (I been Searching Google and I can't find any simple codes) 7-9 lines of codes is preferable because I'm new to Database Any Help will be greatly Appreciated. (Sorry For any inconvenience that have I caused in the past)

    S 1 Reply Last reply
    0
    • N NANCO

      Hi! again. can anyone tell me how to find a specific data Like Name by using ID from a Microsoft Data Base(MS ACCESS DATABASE).(I'm Using Microsoft Visual Basic 2005 Express Edition) Ex: ID Name 01 John 02 Smith I want the Name of the specific ID to come into a textbox. (If I say Find "01" then John Should Be loaded into Textbox1) (I been Searching Google and I can't find any simple codes) 7-9 lines of codes is preferable because I'm new to Database Any Help will be greatly Appreciated. (Sorry For any inconvenience that have I caused in the past)

      S Offline
      S Offline
      Sonia Gupta
      wrote on last edited by
      #2

      If database is ms-access imports system.data.oledb dim con as new oledbconnection("Connection String") con.open dim cmd as new oledbcommand("select name from tablename where id=1",con) dim dr as oledbdatareader=cmd.executerreader() if(dr.read) textbox1.text=dr.item("name").tostring() end if

      N 1 Reply Last reply
      0
      • S Sonia Gupta

        If database is ms-access imports system.data.oledb dim con as new oledbconnection("Connection String") con.open dim cmd as new oledbcommand("select name from tablename where id=1",con) dim dr as oledbdatareader=cmd.executerreader() if(dr.read) textbox1.text=dr.item("name").tostring() end if

        N Offline
        N Offline
        NANCO
        wrote on last edited by
        #3

        thank you very very much.

        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