Search code examples
delphidbexpressdevart

How to Install DBMonitor


This is probably a really simple question, but here it is. I just renewed my license for the DevArt DBExpress driver for Firebird. The help file says I can use their freeware DBMonitor application with it but since I am using D2006, I have to use these instructions:

"If you are Delphi Pro version user, then you don't have TSQLMonitor component installed on the palette, but it is included in SQLExpr.pas unit and you need to install it on the components palette manually."

I can create an instance of TSQLMonitor in code, configure it and use it, but if I did want to put it on my palette, how do I do that? I guess I can put it into its own unit and add it to the dcluser package, but is that what I should be doing?

Thanks for your help.


Solution

  • You should add it to a design package, and re-install the design package, but before installing the package, you should make sure component registration code is added to the package too.

    Check the source file, SQLExpr.pas, and look for Register procedure in the interface section of the unit. If it doesn't have such a procedure, you have to add it manually:

    Add a procedure definition to Interface section:

    procedure Register;

    then implement it in Implementation section like this:

    procedure Register;
    begin
      RegisterComponent('Devart',[TSQLMonitor]);
    end;
    

    Instead of 'Devart', you can use any palette name you like.

    Then you have to save the unit, add it to a design package, and install the design package. Delphi IDE will register the component and add it to component palette.

    Regards.