I have a relational database that has several fields in it (color, product, format, type, etc). I want the user to be able to identify products based on the defect, format etc. I can write an SQL statement that gets the products if I specify the color programmatically. For example,
SELECT [Product] FROM [Table1] WHERE [Color] = ‘Red’
This gives the user all the products that have a red color. But, if I use a drop down list (e.g.,a dropdown list named ddColor) and let the user select the color the code doesn’t work. This doesn’t work
SELECT [Product] FROM [Table1] where [Color] = ‘ ddColor.SelectedValue’.
I know this is a trivial problem but I can’t do it. Where do I go to get some help?
SELECT [Product] FROM [Table1] WHERE [Color] = ‘Red’
This gives the user all the products that have a red color. But, if I use a drop down list (e.g.,a dropdown list named ddColor) and let the user select the color the code doesn’t work. This doesn’t work
SELECT [Product] FROM [Table1] where [Color] = ‘ ddColor.SelectedValue’.
I know this is a trivial problem but I can’t do it. Where do I go to get some help?