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
create an application that performs the following operation with the employee file created by the application in programming challenge 1: uses an open dialog box to allow the user

Earlier versions of VBScript had no mechanism for making user-defined constants. Constants, if utilized, were implemented as variables & distinguished from other variables by using

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

You declare variables explicitly in script via the Dim statement, the Public statement, & the Private statement. For illustration: Dim DegreesFahrenheit You declare multiple

Software That Is Obscure: The Software hides the intensions, meaning and actions from the user. For illustration, if a user is asked whether a full installation, the custom in

Just like normal objects Dictionary object also has definite properties. These properties can be set to any valid value & can be retrieved as and while required. Pr

Displaying the file Without Scrolling: To display a file follow the steps as shown below: 1. Generate a SDI application. 2. Type the coding as shown in the Serialize els

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

The user has to enter a starting balance, the dollar amount of deposits, and the dollar amount of withdrawals. the program then has to calculate the balance

To run only one statement while a condition is True, employ the single-line syntax for the If...Then...Else statement. The following instance shows the single-line syntax. Notice t