Answers
![PeterNZ](https://data3.answerbase.com/answerbase/1720/Images/Avatars/avatar_01.jpg)
Jul 01, 2007 - 08:56 PM
Me.DropDownList1.Items.Clear()
Dim da As New SqlDataAdapter("select productID,ProductName from Products", "data source=.;initial catalog=northwind;user id=sa")
Dim ds As New DataSet
da.Fill(ds, "Products")
da.Dispose()
Me.DropDownList1.DataSource = ds.Tables("Products")
Me.DropDownList1.DataTextField = "ProductName"
Me.DropDownList1.DataValueField = "ProductID"
Me.DropDownList1.DataBind()
Hope this helps
Cheers
Peter
![bc030400030](https://data3.answerbase.com/answerbase/1720/Images/Avatars/avatar_01.jpg)
Jul 05, 2007 - 12:42 AM
Add New Comment![Sending...](https://quomon.com/images/loading-boxes.gif)