dealing with more than table
-
hello friends....how r u? well i've 3 tables in access and i wanna connect with them by vb.net .....any help plzzzzzzzzzzz see my codes... in buttun btnsearch , i used select command to search about information about patiend by his name then display that in textboxes as......
Private Sub Btnsearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnsearch.Click Dim Sel As New OleDbCommand Dim R As OleDbDataReader Sel.Connection = OleDbConnection1 Sel.CommandText = "select* from [patients appointment] where ([patient_name]=" & TxtName.Text & ")" OleDbConnection1.Open() R = Sel.ExecuteReader If R.Read Then TxtName.Text = R.GetValue(0) TxtFleNum.Text = R.GetValue(1) TxtDate.Text = R.GetValue(2) TxtDoName.Text = R.GetValue(3) TxtClinic.Text = R.GetValue(4) TxtNote.Text = R.GetValue(5) Else MsgBox("we can't find any date about the selected name") End If OleDbConnection1.Close() R.Close() End Sub
well... i used up to search about patient and display his information from 1 table, but that patient have another information in another table and i wanna display that in textbox...how can i do that in button of search?? i hope u understood me and i can find answers:) Sally>>>><<<>>><<<