title: How to get the latest row from database when ID is GUID
body: <p>I am having some trouble trying to pull the latest row from SQL tables. The user can fill out an expense form and the data from the ASP.NET text boxes gets sent to the database, but when the user submits more data I cannot pull the latest data and populate the text boxes with that data. I am using a GUID as the ID fields. I have stored the <code>userID</code> in the <code>Session["New"]</code>.</p>
  
  <p>Here's my SQL statement:</p>
  
  <pre><code>string str = "select * from CashFlow where userID='" + Session["New"].ToString() + "'"; 
  </code></pre>