An inexplicable error class error in my application

73 Views Asked by At

I have a major problem and I have no idea how it might be corrected. Out of the blue, when I compile then try to run my application - which I have been working on for six months - I get a Class Not Registered error. I also have a pop-up error message saying that dbx.dbl was not found. I have added nothing to the program in the past few days which included any new classes. I am using Delphi 5. I do not know how to identify which class is not registered. The program will not run and I have spent hours trying to track down the problem without success.

More information: I have moved the executable and data files to another computer, and it all runs fine. So it seems to be a problem with my development box.

More Information: I did as fpiette suggested but found nothing which helped. So I created a very basic application:

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Db, ADODB;

type
  TForm1 = class(TForm)
    ADOConnection1: TADOConnection;
    ADOQuery1: TADOQuery;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
   ADOConnection1.Connected := True;
   ADOQuery1.Close;
   ADOQuery1.Connection := ADOConnection1;
   ADOQuery1.SQL.Clear;
   ADOQuery1.SQL.Add('select * from tblsupplier');
   ADOQuery1.Open;
end;

end.

The Class Not Registered error occurs when it executes the ADOQuery1.Open; line.

Am I right in assuming that since there are no other components in the program that the error must be in the ADO code? The ADOConnection1 points at an Access database called Suppliers and the connection test was successful.

0

There are 0 best solutions below