Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic Populating ListBox Problem

Status
Not open for further replies.

checkai

Programmer
Jan 17, 2003
1,629
US
Here is what I am doing...

I have a txtBox that I type a value into...then the Search button should retrieve multiple values from the db based on the item entered and place them in the list box....

I started using the dataadapter, dataset, connection objects...

here is my code on the click event...

Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
lbxClientSearch.Items.Clear()
Dim str As String
str = "Select searchName from tblClient"
sdaClient.SelectCommand.CommandText = str
conClient.Open()
sdaClient.SelectCommand.ExecuteNonQuery()
lbxClientSearch.DataSource = DsClient1
lbxClientSearch.DataBind()
conClient.Close()

sdaClient.Fill(DsClient1)
lbxClientSearch.DataBind()
End Sub


Any ideas...I am very new to .NET...

THANKS!!

DLC
 
ok, the second i submitted this thread...

I GOT IT TO WORK!!!

thanks anyway!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top