Compiler errors when using variables in an SQL statement
<p>I am trying to code a logon process, but I get stuck when trying to execute an SQL statement containing variables that will come in from user input.</p>

<p>Here is how it looks:</p>

<pre><code>Var 
  SS,temp,fn,sn: string;
Begin 
  ADO := TDBClass.Create('ICAdatabase.mdb');

  SS:= 'SELECT * FROM Agents Where aName = '  '  ' + fn + ' ' '  And aSurname = ' ' ' + sn +  ' ' ' ';

  Temp := Ado.processquery(SS);
End;
</code></pre>

<p>When I try to use variables like this, I get either "missing operator" or "semi-colon error" or "unterminated string".  Why is this?</p>