title: Get a value from Database According to the Member Name with vb.net?
body: <p>I have a SQL table which looks like:</p>
  
  <pre><code>+-------------------+
  | id   member   req |
  +-------------------+
  | 1    Jim      0   |
  | 2    Mary     0   |
  | 3    Hunter   0   |
  +-------------------+
  </code></pre>
  
  <p>I need to get the <code>id</code> of a certain member through my vb.net application (WinForms) in Visual Basic 2010.</p>
  
  <p>Lets say I wanted to get <strong>Mary</strong>'s <code>id</code>. What is the SQL query to return the <code>id</code> for <strong>Mary</strong>?</p>
  
  <p>Whats the Query for that?</p>
  
  <p><strong>--------------------------------------------------------------------------------</strong></p>
  
  <p>Possible Query Code:</p>
  
  <p><code>'My.Settings.username</code> is the name I'm looking up in the database to get the member <code>id</code>.</p>
  
  <p><code>Dim SQLID As String = "SELECT id FROM members WHERE member= '"
                       &amp; My.Settings.username &amp; "'"
  submitRequest(SQLID)
  vagueID.Text = 'ID Here'</code></p>