title: How to Get database values into and out of code. in Delphi 7
body: <p><strong>BACKGROUND</strong></p>
  
  <p>I am making a simple program to log data and do a few calculations with a .MDB database. accessed via Jet 4.</p>
  
  <p><strong>AIM</strong></p>
  
  <p>I wish to be able to get the value out of / into any field from a sql query on a primary key(one result)</p>
  
  <p><strong>CURRENT</strong></p>
  
  <p>I have currently connected to the database and I am able to view edit the data via "data controls"</p>
  
  <p>as shown below:</p>
  
  <p><img src="https://i.stack.imgur.com/zfeR4.jpg" alt="enter image description here"></p>
  
  <p><strong>QUESTION</strong></p>
  
  <p>How do I access the data in the database such that I may put the values into a suitable variable and then write them back?</p>