Click here to Skip to main content
15,920,603 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Dump Windows Password Hashes Pin
Dave Kreskowiak26-Jun-08 13:50
mveDave Kreskowiak26-Jun-08 13:50 
AnswerRe: Dump Windows Password Hashes Pin
jzonthemtn27-Jun-08 2:22
jzonthemtn27-Jun-08 2:22 
AnswerRe: Dump Windows Password Hashes Pin
Paul Conrad27-Jun-08 16:19
professionalPaul Conrad27-Jun-08 16:19 
Questiongetting selected row index from a listView Pin
AAGTHosting26-Jun-08 10:04
AAGTHosting26-Jun-08 10:04 
AnswerRe: getting selected row index from a listView Pin
Mycroft Holmes26-Jun-08 16:19
professionalMycroft Holmes26-Jun-08 16:19 
QuestionListBox Control Pin
Saam_cse26-Jun-08 2:35
Saam_cse26-Jun-08 2:35 
AnswerRe: ListBox Control Pin
~Khatri Mitesh~26-Jun-08 3:09
~Khatri Mitesh~26-Jun-08 3:09 
AnswerRe: ListBox Control Pin
John_Adams26-Jun-08 3:40
John_Adams26-Jun-08 3:40 
Hi,

You need to implment the parent-child relationship between the two tables to get the desired results. You may try the following code snippet:

---------------------------------------------------------------------------------------------------

BEGIN CODE

Dim dc As OleDbConnection

Dim connstr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Nwind.mdb;"

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim da As OleDbDataAdapter
Dim dt As DataTable
Dim dv As DataView

dc = New OleDbConnection(connstr)
da = New OleDbDataAdapter("Select * from Products", dc)
dt = New DataTable

da.Fill(dt)

dv = New DataView(dt)
Me.ListBox1.DataSource = dv

End Sub


Private Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

Dim SupplierIDString = Me.C1Combo1.Columns("SupplierID").Text.ToString()
Dim da As OleDbDataAdapter
Dim dt As DataTable
Dim dv As DataView

dc = New OleDbConnection(connstr)
da = New OleDbDataAdapter("Select * from Supplier where SupplierID = '" + SupplierID+ "'", dc)
dt = New DataTable

da.Fill(dt)

dv = New DataView(dt)
Me.ListBox2.DataSource = dv

End Sub

END CODE

---------------------------------------------------------------------------------------------------

Hope this helps Smile | :) .

Regards,
John Adams
ComponentOne LLC

QuestionBuilding release version Pin
Jay Royall26-Jun-08 0:40
Jay Royall26-Jun-08 0:40 
AnswerRe: Building release version Pin
Kschuler26-Jun-08 8:47
Kschuler26-Jun-08 8:47 
GeneralRe: Building release version Pin
Jay Royall26-Jun-08 22:34
Jay Royall26-Jun-08 22:34 
Questionmake more easier Pin
shee_dee8625-Jun-08 23:51
shee_dee8625-Jun-08 23:51 
AnswerRe: make more easier Pin
Christian Graus25-Jun-08 23:57
protectorChristian Graus25-Jun-08 23:57 
AnswerRe: make more easier PinPopular
Guffa26-Jun-08 0:33
Guffa26-Jun-08 0:33 
GeneralRe: make more easier Pin
Christian Graus26-Jun-08 0:38
protectorChristian Graus26-Jun-08 0:38 
GeneralRe: make more easier Pin
Guffa26-Jun-08 10:06
Guffa26-Jun-08 10:06 
GeneralRe: make more easier Pin
Christian Graus26-Jun-08 12:43
protectorChristian Graus26-Jun-08 12:43 
QuestionList Domains and machines Pin
nitin_ion25-Jun-08 21:48
nitin_ion25-Jun-08 21:48 
AnswerRe: List Domains and machines Pin
Mycroft Holmes26-Jun-08 16:24
professionalMycroft Holmes26-Jun-08 16:24 
GeneralRe: List Domains and machines Pin
Steven J Jowett26-Jun-08 23:11
Steven J Jowett26-Jun-08 23:11 
JokeRe: List Domains and machines Pin
Ariel Kazeed27-Jun-08 0:40
Ariel Kazeed27-Jun-08 0:40 
GeneralRe: List Domains and machines Pin
Mycroft Holmes27-Jun-08 0:55
professionalMycroft Holmes27-Jun-08 0:55 
QuestionSet nothing to VB Collection class object, is it really removes items internally. Pin
Sakthivel P25-Jun-08 21:09
Sakthivel P25-Jun-08 21:09 
AnswerRe: Set nothing to VB Collection class object, is it really removes items internally. Pin
Ashfield25-Jun-08 21:29
Ashfield25-Jun-08 21:29 
AnswerRe: Set nothing to VB Collection class object, is it really removes items internally. Pin
Christian Graus25-Jun-08 22:15
protectorChristian Graus25-Jun-08 22:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.