How to Install DBMonitor

断了今生、忘了曾经 提交于 2021-02-19 07:27:35

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/2299444/how-to-install-dbmonitor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!