senthil_aries 0 Newbie Poster

My requirement is to select a supplier name from a Dropdown list(DropDownList_Supplier) and use the value to get Supplier id from the table "[SQS].[dbo].[Services]". I am using the below code and i am not able to get the value in the required field.

Public SUPTEXT As String = "SELECT [ID] FROM [SQS].[dbo].[Services]"
Dim supplierCriteria As String = SUPTEXT.ToString()
supplierCriteria += " WHERE [Supplier] = '" & DropDownList_Supplier.SelectedValue & "'"
DetailsView1.Rows(1).Cells(1).Text = supplierCriteria.ToString()

Can someone help me on this please?