We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,567 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

how to select from multiple table?

can you help me how to select from multiple tables. so far this is my code how do i

Dim dr As OleDbDataReader

    Dim dc As New OleDbCommand

        dc.Connection = conn
        dc.CommandText = "SELECT * FROM tblClient, tblLoan WHERE ClientNo =  '" & ClientNo & "'"
        dr = dc.ExecuteReader
        If dr.HasRows Then
            While dr.Read

                    'for tblCLient
                    frmClientsProfile.lblClientNo.Text = dr.Item(0)
                    frmClientsProfile.lblFirstName.Text = dr.Item(1)
                    frmClientsProfile.lblLastName.Text = dr.Item(2)
                    frmClientsProfile.lblAge.Text = dr.Item(3)
                    frmClientsProfile.lblAddress.Text = dr.Item(4)
                    frmClientsProfile.lblBirthday.Text = dr.Item(5)
                    frmClientsProfile.lblGender.Text = dr.Item(6)
                    frmClientsProfile.lblContactNo.Text = dr.Item(7)
                    ' for tblLoan
                    'frmClientsProfile.lblBalance.text = dr.item() <- what should i put here?

                End While
            End If
2
Contributors
2
Replies
1 Day
Discussion Span
11 Months Ago
Last Updated
3
Views
Question
Answered
shizzle08
Newbie Poster
6 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

thanks i how ever views this im figure it out myself

shizzle08
Newbie Poster
6 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
Question Self-Answered as of 11 Months Ago

Do post your code after u solve it successfully so that it is helpful to others....

poojavb
Posting Pro
524 posts since Nov 2011
Reputation Points: 39
Solved Threads: 77
Skill Endorsements: 5

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0617 seconds using 2.7MB