title: Running a Query to Get Data
body: <p>Okay, I'm running into a snag with a major project that I need to have done by Wednesday, and am JUST getting on my feet about.  I need to get the following SQL Query run through VB to get some data to be used in my program:</p>
  
  <pre><code>SELECT Pay FROM Players
  WHERE (Name = @Name)
  </code></pre>
  
  <p>Yes, I am trying to sent a parameter to the query, as I don't want the whole column, but rather just a singular entry within the column, hence the WHERE clause.  Now, this in mind, how exactly do I call that up?</p>
  
  <p>Here's my current code that I'm using in my program:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Public Class frmName
  Private mNames As New Names
  
  Private Sub frmName_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      cboSelect.DataSource = mNames.Names
      cboSelect.DisplayMember = "Name"
      cboSelect.ValueMember = "Name"
  
      'TODO: This line of code loads data into the 'RRBCDataSet.Players' table. You can move, or remove it, as needed.
      'Me.PlayersTableAdapter.Fill(Me.RRBCDataSet.Players)
  
  End Sub
  
  Private Sub btnSelect_Click(sender As Object, e As EventArgs) Handles btnSelect.Click
  
  End Sub
  </code></pre>
  
  <p>Now, yes, this is essentially the user being prompted to select a player from a baseball team from the ComboBox list that has the players pre-loaded into the selection list.  My question is, how do I call the query when the user clicks 'Select'?  From there, the calculations that are to follow I've got worked out in another module as a series of functions and methods. </p>