I am currently trying to create a tool that will be used to search through our Non-Conformance Report cards , take the data such as state and the card number and put it into a datagridview that I have created. I have managed to get it to look at the databases in the vault such as variables but don't know how to get it to pick up tangible data and put them into the data grid created.
The code I've got so far for it is:
Private Sub DataGridView1_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles NCRList.CellContentClick
NCRList.DataSource = NonConformanceList()
Private Function NonConformanceList() As DataTable
Dim DTVariables As New DataTable
Dim ConnString As String = ConfigurationManager.ConnectionStrings("NCR_Tracker.My.MySettings.Rotron_Live_VaultConnectionString2").ConnectionString
Using Conn As New SqlConnection(ConnString)
Using CMD As New SqlCommand("Select * From dbo.Variable", Conn)
Dim Reader As SqlDataReader = CMD.ExecuteReader()
Any help would be appreciated.