visual basic 2012, Visual Basic Programming

I am a beginner in Visual basic 2012 and making a data management programme with visual basic 2012 as front end and MySql as back end. I want to filter data grid view table with List box (multiple selected) . When I select one item it works fine and when I select multiple items in the List box I do not have code can u help me please. I am able to get all the items of a column in the list box by following code

Query = "Select * from `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 for filtering data when I use below query it does not work ( for multiple selected or more than one item ) It does not work Query which I use is-
Query = "Select * from `rrrr.data`.`trial` Where `COUNTRY`in (''" & ListBox1.SelectedItem& "'' )"

Kindly help me out
Also can I use Combobox and Checked List Box foor similar filtering
nimum 100 words accepted#
Posted Date: 8/8/2016 10:46:01 AM | Location : USA







Related Discussions:- visual basic 2012, Assignment Help, Ask Question on visual basic 2012, Get Answer, Expert's Help, visual basic 2012 Discussions

Write discussion on visual basic 2012
Your posts are moderated
Related Questions
John''s gas supply is read from a 4-digit meter each month that shows the current total gas used in cubic meters. The amount of gas used that month is determined by subtracting t

Option Explicit Declaration: If the option explicit is used essentially then all the variables will have to be declared. Or else an error will be reported saying that the vari

Write an event procedure to automate the billing system of a supermarket. Give the details of database tables, forms, controls and menu design (if any). Make assumptions, wherever

We are need of VB.NET Dynamically Created Gridview with Textboxes, DDLs Utilizing VB code in ASP.NET I dynamically create a calendar showing either 3 or 6 or 9 or 12 months, dep

Write a program that permits the user to order a product from inventory. The user selects the product and enters the quantity. If there is sufficient quantity on hand of the produc

The Refresh Method: The refresh method transfer to the first record in the record set. To invoke the refresh method follow the syntax which is as shown below: Form1.Data1.R

Create a VB calculator application that appears as in the screen shots below. The user enters numbers in the textboxes labelled Number 1 and Number 2. When a calculati

Each piece of data is passed in your process using an argument. Arguments serve like placeholders for the data you wish to pass into your process. You can name your arguments along

to dial a person''s 10 digit number and assign it to their name

Databound Controls - A controls use to display the contents of table using Data Control , have to bound each Control to the specific field and the controls are Known as the Data Bo