title: Class TADOConnection / TADOTable Not Found
body: <p>Okay, so my application was working just fine until I decided to clean up the design-time form a bit by creating a DataModule form and moving all database components to it.  I'm using Delphi XE2 Update 1 and these components, TADOConnection, TADOTable, TADOQuery, TADOCommand.  As soon as I tried to run the app for the first time with the above named components on the DataModule form, instead of the main form, it now returns an error when this line from the DPR is executed:</p>
  
  <p><code>Application.CreateForm(TDataModule1, DataModule1);</code></p>
  
  <p>The error raised is <strong>Class TADOCOnnection not found.</strong>.  Now that I removed and re-added the TADOConnection to the DataModule form, it now raises a different error: <strong>Class TADOTable not found.</strong>, but I think that is just because the create order has changed on the DataModule and a <code>TADOTable</code> is now the first object that is created on the form.</p>
  
  <p>My <code>uses</code> clause from the DataModule is:</p>
  
  <p><code>uses System.SysUtils, System.Classes, Data.Win.ADODB, Data.DB;</code></p>
  
  <p>I read other posts that said to include ADODB and DB in the uses clause to overcome this error, but that doesn't seem to help.</p>
  
  <p>My full DPR file is:</p>
  
  <pre><code>program Project1;
  
  uses
    Vcl.Forms,
    Unit1 in 'Unit1.pas' {Form1},
    Unit2 in 'Unit2.pas' {DataModule1: TDataModule};
  
  {$R *.res}
  
  begin
    Application.Initialize;
    Application.MainFormOnTaskbar := True;
    Application.CreateForm(TForm1, Form1);
    Application.CreateForm(TDataModule1, DataModule1);
    Application.Run;
  end.
  </code></pre>
  
  <p>I even tried removing the line from the DPR file that creates the DataModule and doing that manually in the main form, but that just changes when I get the same error message(s).</p>
  
  <p>I'm not sure what to try next, aside from moving all the components back to the main form.  Don't DataModule forms work the same in XE2 as prior versions of Delphi, and why aren't the same TADOConnection and TADOTable class not found messages raised when the components are on the main form?</p>
  
  <p>Any thoughts or insights are very much appreciated.</p>
  
  <p>James</p>