|
-
Apr 3rd, 2002, 11:18 AM
#1
Thread Starter
New Member
Just starting VB.NET, adding from DataSet to Multi Listbox
Good morning all. OK here is the situation. I am just starting to learn VB.NET and I want to take a SQL connection or a table and populate a multi-column listbox. Here is the code I have so far
Dim selectCMD As SqlClient.SqlCommand = New SqlClient.SqlCommand("SELECT * FROM tblDeals", myConnection)
Dim custDA As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter()
Dim custDS As DataSet = New DataSet()
Dim pRow As DataRow
selectCMD.CommandTimeout = 60
custDA.SelectCommand = selectCMD
custDA.Fill(custDS, "tblDeals")
Me.lstDeals.Items.Clear()
Me.lstDeals.MultiColumn = True
Me.lstDeals.BeginUpdate()
For Each pRow In custDS.Tables("tblDeals").Rows
' is it done this way???
Me.lstDeals.Items.Add(????)
Next
If VB 6 I know what to do, however how does the new VB.NET handle this. Any help on this would be great.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|