title: Getting record data into class in Delphi
body: <p>I guess I must be dense, I'm new to Delphi and am trying to read a sql result into a class to access it easily.
   I have created a dummy class to test like this:</p>
  
  <pre><code>type
  test_class = class
   id:integer;
   job_number:string;
   cust_name :string ;
   procedure get_record_data;
  end;
  </code></pre>
  
  <p>Then I call the procedure like this:</p>
  
  <pre><code>procedure test_class.get_record_data;
  begin
   test_class.Create;
   test_class.id := tform3.adoQuery1.FieldByName('id').AsInteger;
   test_class.job_number := tform3.adoQuery1.FieldByName('job number').AsString;
   test_class.cust_name := tform3.adoQuery1.FieldByName('customer name').AsString;
  end;
  </code></pre>
  
  <p>Then I test my result like this:</p>
  
  <pre><code>procedure TForm3.Button1Click(Sender: TObject);
  begin
   showmessage('Id number is ' + inttostr(test_class.id));
  end;
  </code></pre>
  
  <p>The showmessage line throws a compiler error that says Method Identifier Expected.</p>
  
  <p>The lines that start with test_class.id:=, test_class.job_number:= and                        test_class.cust_name:= 
  all give me the same Method Identifier Expected as well as a Missing Operator or semicolon error.</p>
  
  <p>What am I doing wrong? Is there an easier way to go about this? Once I get this done, will null values present an issue?</p>