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
Goal Create a Visual Basic that allows a user to play a variation of Hangman. User Inputs • The user types a letter into the textbox. Functional Items 1. Read a series

VBScript Operators VBScript contain a full range of operators, including comparison operators, arithmetic operators, concatenation operators, and logical operators.

Benefits of Using DLLs: The dynamic linking has the following advantages which are as shown below: It saves memory and decreases the swapping. Many processes can use a s

INTRINSIC CONTROLS   The Intrinsic controls are the built-in controls. Few of the controls are Combo box, Check box, Command Button, Label etc. The controls have properties re

Use the While keyword to verify a condition in a Do...Loop statement. You can verify the condition before you enter the loop (as illustrated in the following ChkFirstWhile instance

Tab Order: The tab order stands for the order in which the controls receive focus when the user clicks the tab key. The CTRL + D can be used to set the tab order of controls.

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

Describe different validation controls of VB.net?

THE MFC CLASSES The CDocument, CWinAppCFrameWnd and CView are derived from the CObject and they give the majority of the structure and functionality.

write a detailed account on ADO.net architecture.