problem with dynamic sql using combo box, anyone can solve?

ss123

Member
Joined
Feb 25, 2006
Messages
14
Programming Experience
1-3
Dear all,

i have using the item in combo box to serve as a word for sql query to use ie. Dim mySelectQuery As String = "SELECT '" & Replace(Cbx1.SelectedItem, "'", "''") & "',Stock_Name FROM Stock ", but it just show me the words in the combo box and stock name from the database.
So how to make it to be recognize by the system to retrive the data from db? Please advise. Thanks in advance.
 
Back
Top