Private Sub SelectItems_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim cn As New SqlConnection(strConn) Dim SQL As String SQL = "SELECT UserId As Id, FullName As Name, 0 As Selected FROM Users WHERE Terminated = 0" Using da As New SqlDataAdapter(SQL, cn) da.Fill(dt) End Using bs1.DataSource = dt bs1.Sort = "Name" bs1.Filter = "Selected = 0" lbxUnSelectedItems.DataSource = bs1 lbxUnSelectedItems.ValueMember = "Id" lbxUnSelectedItems.DisplayMember = "Name" bs2.DataSource = dt bs2.Sort = "Name" bs2.Filter = "Selected = 1" lbxSelectedItems.DataSource = bs2 lbxSelectedItems.ValueMember = "Id" lbxSelectedItems.DisplayMember = "Name" cn = Nothing End Sub
|How can I use SQL Stored Procedure to return FedEx Zone||17||41|
|In WPF / C# binding a local database in code behind||1||24|
|VB 2005 how to get a new line of data each time I try to write to a file.||10||15|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
22 Experts available now in Live!