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
I need a VB6 software for making a soccerboard for 10 teams & automatically generate their fixtures

This is from the book Programming in Visual Basic 2010 by Julia Case Bradley and Anita C. Millspaugh. The assignment is located in Chapter 3 on page 154. Before I type it in, I wou

Indexing: In libraries, the card catalog is the index. The three indices are used in the library. The Author, Subject and title are the 3 indices. Each index is relative. The

Hungarian Notation: The Hungarian Notation was invented by Charles Simonyi from Microsoft. It is a naming convention. It is a reminder of the type of a variable. The Handles h

CONTROL ARRAY The control array is a group of similar objects with similar name. Adding controls with control arrays uses less resource than simply adding the multiple controls

A vehicle dealership has a number of different items for sale: motorbikes, cars, vans and boats. Each class of items for sale has different characteristics that need to be recor


Visual Basic 1. What is the method of creating a new project in VB.SSS 2. Illustrate Code Editor Window and Solution Explorer. 3. Write a VB program to sort and display a

Sets or returns wholly qualified path to a Help File. If Help file is indicated in HelpFile, it is called automatically when the user clicks Help button (or presses the F1 key) in

Software That Is Rude: The software warns the user for making the mistakes. The Message boxes pop up representing the mistake and the user will have to click the OK or CANCEL