Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 9 of 9 total
Thread Class TDBISAMEngine not found
Sun, Nov 4 2007 1:45 AMPermanent Link

Dave Harrison
If I start a new application and drop a TDBISAMEngine on an empty
Datamodule or an empty form and try and run the application, I get
EClassNotFound exception "Class TDBISAMEngine not found". Am I suppose
to modify the package before using the DBISAMEngine component?

TIA
Dave
BDS2006 & DBISAM 4.25 Build 5
Sun, Nov 4 2007 5:56 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Dave


Has Delphi added the necessary units (don't know what) to the uses clause?

Roy Lambert
Sun, Nov 4 2007 3:07 PMPermanent Link

Dave Harrison
Roy Lambert wrote:
> Dave
>
>
> Has Delphi added the necessary units (don't know what) to the uses clause?
>
> Roy Lambert
>

Roy,
   Yes, the Uses clause has dbisamtb which has the TDBISAMEngine class.
You can try this yourself. Create a new application and drop a
TDBISAMEngine from the palette to the empty form, compile and run.
You'll get the same error at run time.

Dave
BDS2006 & DBISAM 4.25
Mon, Nov 5 2007 3:23 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Dave


Oh no I don't Smiley

Roy Lambert

unit Unit2;

interface

uses
 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 Dialogs, dbisamtb;

type
 TForm2 = class(TForm)
   DBISAMEngine1: TDBISAMEngine;
 private
   { Private declarations }
 public
   { Public declarations }
 end;

var
 Form2: TForm2;

implementation

{$R *.dfm}

end.
Mon, Nov 5 2007 10:56 AMPermanent Link

Dave Harrison
Roy Lambert wrote:
> Dave
>
>
> Oh no I don't Smiley
>
> Roy Lambert
>
> unit Unit2;
>
> interface
>
> uses
>   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
>   Dialogs, dbisamtb;
>
> type
>   TForm2 = class(TForm)
>     DBISAMEngine1: TDBISAMEngine;
>   private
>     { Private declarations }
>   public
>     { Public declarations }
>   end;
>
> var
>   Form2: TForm2;
>
> implementation
>
> {$R *.dfm}
>
> end.
>

Roy,
   Ok, then it's me. Smile

I did some more sleuthing and it turns out when I drop a TDBISAMEngine
component onto a form or datamodule, it doesn't get added to the form
definition:

type
  TForm1 = class(TForm)
  private
    { Private declarations }
  public
    { Public declarations }
  end;


This looks like an empty form, but there is a TDBISAMEngine component
sitting on the form in the form designer. To fix it I have to type
"DBISAMEngine1: TDBISAMEngine" into the form definition, then it runs
fine.

Dave
Mon, Nov 5 2007 11:49 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Dave


That would explain it Smiley

I do remember other posts about the same problem. Can't remember what happened though.

Roy Lambert
Mon, Nov 5 2007 1:24 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Dave,

<< If I start a new application and drop a TDBISAMEngine on an empty
Datamodule or an empty form and try and run the application, I get
EClassNotFound exception "Class TDBISAMEngine not found". Am I suppose to
modify the package before using the DBISAMEngine component? >>

We've had a couple of reports of this, but have never been able to replicate
it here.  It's something wonky with the IDE and the singleton architecture
of the TDBISAMEngine component, but I don't know what.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Nov 5 2007 4:20 PMPermanent Link

Dave Harrison
Tim Young [Elevate Software] wrote:
> Dave,
>
> << If I start a new application and drop a TDBISAMEngine on an empty
> Datamodule or an empty form and try and run the application, I get
> EClassNotFound exception "Class TDBISAMEngine not found". Am I suppose to
> modify the package before using the DBISAMEngine component? >>
>
> We've had a couple of reports of this, but have never been able to replicate
> it here.  It's something wonky with the IDE and the singleton architecture
> of the TDBISAMEngine component, but I don't know what.
>

Tim,
   As long as I can solve the problem by entering the TDBISAMEngine
reference into the form manually, that's ok.

   Don't you just love those problems that takes 2 hours to figure out
what's wrong, and then it takes only 5 seconds to fix it. Smile

Dave

P.S. Thanks Roy!
Tue, Nov 6 2007 1:12 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Dave,

<< As long as I can solve the problem by entering the TDBISAMEngine
reference into the form manually, that's ok. >>

Yes, that's the only solution that I'm aware of at this time.   However, as
an aside, EDB does not have this issue because it uses a different method of
achieving the singleton architecture without using the TObject.NewInstance
way of replicating the same object image.

<< Don't you just love those problems that takes 2 hours to figure out
what's wrong, and then it takes only 5 seconds to fix it. Smile>>

Yep. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Image