in my asp.net+vb+access database web. in a page ia m using a query to count.. the following code works fine
qstr1 = "select count(*) from Pers where coy='tata' and OutDetails IS NULL and firm='" + DropDownList1.Text + "'"
but the next one is not working (in the below one i want dropdownlist value (names) contains in outdetails field
qstr8 = "select count(*) from pers where OutDetails like '" + DropDownList1.Text + "'"
Baiju EP
qstr8 = "select count(*) from pers where OutDetails like '" + DropDownList1.Text + "'"
Try this:
qstr8 = "select count(*) from pers where OutDetails like '%" + DropDownList1.Text + "%'"
Thanks.
沒有留言:
張貼留言