Skip to Content
0
Former Member
Jul 30, 2005 at 07:07 AM

Please Help me

14 Views

Dear All,

I can't use value of combo Box in where condition of data adapter in coding. How do i do? please help me! I want to use where condition form selected value of combo Box. I write as follow but run time error is appear.

dim sSQL as string

sSQL = "SELECT ProductID, ProductName, SupplierID, CategoryID, UnitPrice FROM Products Where CategoryID= " & cboCategory.SelectedValue & " "

Dim daProducts As New SqlDataAdapter(sSQL, con)

dim dsProducts as DataSet

dsProducts.Clear()

daProducts.Fill(dsProducts, "Products")

Thanks and best regards,

znp