i making data management program visual basic 2012 frontend , mysql backend. want filter data grid view table list box (multiple selections). when select 1 item works fine , when select multiple items in list box, not have code. able items of column in list box following code:
query = "select * `rrrr.data`.`trial` " command = new mysqlcommand(query, mysqlconn) reader = command.executereader while reader.read dim scountry = reader.getstring("country") listbox1.items.add(scountry) end while
but filtering data when use below query not work ( multiple selected or more 1 item ) not work. query use is:
query = "select * `rrrr.data`.`trial` `country`in ('" & listbox1.selecteditem& "' )"
kindly me out can use combobox
, checked list box similar filtering.
Comments
Post a Comment