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