title: BDE to ADO conversion in DELPHI 2010
body: <p>I am working on converting BDE to ADO for my company. I have run into an expression I can not figure out how to convert to ADO</p>
  
  <p>Here is the BDE expression with all the ADO changes except for one....the part that is causing me issues is the </p>
  
  <p>with Tquery.Create(nil) do at the beginning. Any ideas?</p>
  
  <pre><code>  with Tquery.Create(nil) do
          begin
              cmd := TStringList.Create;
              cmd.Add('select top 3 csnttext from casenotesint');
              cmd.Add('where csntcaseid = ''' + scasenum + ''' ');
              cmd.Add('and csntclmid = ''' + sclmnumber + ssplitcode + ''' ');
              cmd.Add('order by csntseqnum desc');
              rs := fConnection.Execute(cmd.Text);
              cmd.Free;
  
              while not Eof do
              begin
                  SAPrintReport1.Tab(0.5);
                  SAPrintReport1.Print(rs.Fields.Item('CsNtText').Value);
                  SAPrintReport1.NewLine;
                  rs.next;
              end;
              rs.Close;
          end;
          if cbxSpacer.checked then
          begin
              SAPrintReport1.NewLine;
              SAPrintReport1.NewLine;
              SAPrintReport1.NewLine;
          end;
  </code></pre>