Delphi 2007 and DBMonitor 2.10 error

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Hans
Posts: 52
Joined: Wed 24 Aug 2005 20:05

Delphi 2007 and DBMonitor 2.10 error

Post by Hans » Sun 01 Jul 2007 07:40

Hi,

I use Delphi 2007 on Vista Ultimate. I installed DBMonitor (2.10) but now i get an error that i use the wrong version of DBMonitor when i use the monitor component.

Is there a new version of DBMonitor available to solve this problem?

best regards,
Hans

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 03 Jul 2007 08:21

Please provide the exact error message, and describe the situation in which this error appears.

Hans
Posts: 52
Joined: Wed 24 Aug 2005 20:05

Post by Hans » Wed 04 Jul 2007 06:38

After i installed DBMon.exe 2.10 on my Vista PC using Delphi 2007 (CodeGear):

-> When i drop a TMySQLMonitor component on my form i get the error "Current DBMonitor is out of date, PLease update".

I noticed that in the Delphi Menu "MySQL" you still have the option "Download DBMonitor" which means that the integration of DBMonitor probably has failed.

If i ide-install DBMonitor, i can drop a TMySQLMonitor but when i start the SQL Monitor (using right click menu on component" it opens a dialog but it is disconnected?

Please explain how i can get this working.

best regards,
Hans

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 04 Jul 2007 14:38

Try to uninstall DBMonitor, remove the following registry key: HKCU\Software\CoreLab\DBMonitor, and install DBMonitor again.

If the problem persists, try to create a new application and run the following code:

Code: Select all

uses
  Registry;

procedure TForm1.Button1Click(Sender: TObject);
const
  Class_DBMonitor: TGUID = '{89F49E65-F6E0-11D6-9038-00C02631BDC7}';
begin
  with TRegistry.Create do begin
    RootKey := HKEY_CLASSES_ROOT;
  {$IFDEF CLR}
    if OpenKey('CLSID\{' + GUIDToString(Class_DBMonitor) + '}\InprocServer32', False) then
  {$ELSE}
    if OpenKey('CLSID\ + GUIDToString(Class_DBMonitor) + '\InprocServer32', False) then
  {$ENDIF}
     MessageDlg('Class_DBMonitor found', mtInformation, [mbOK], 0)
   else
     MessageDlg('Class_DBMonitor not found', mtError, [mbOK], 0);
  end;
end;
If the requested registry item will not be opened, check with a registry editor whether this item exists.

Hans
Posts: 52
Joined: Wed 24 Aug 2005 20:05

Post by Hans » Wed 04 Jul 2007 15:34

I followed all the steps. Pushing the button results in a message

"Class_DBMonitor not found"

I can find the GUID in the registry, but it is empty.

best regards,
Hans

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 05 Jul 2007 15:07

Try to uninstall DBMonitor and remove this registry key:

Code: Select all

HKCR\CLSID\{89F49E65-F6E0-11D6-9038-00C02631BDC7}
After that install DBMonitor once again. If the problem still persists, check wether the registry key mentioned above was recreated. If it was, export it to a file and show us code of this file. It should look like this:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{89F49E65-F6E0-11D6-9038-00C02631BDC7}]
@=""

[HKEY_CLASSES_ROOT\CLSID\{89F49E65-F6E0-11D6-9038-00C02631BDC7}\InprocServer32]
@="D:\PROGRA~1\CoreLab\DBMONI~1\DBMONI~1.DLL"
"ThreadingModel"="Both"

[HKEY_CLASSES_ROOT\CLSID\{89F49E65-F6E0-11D6-9038-00C02631BDC7}\ProgID]
@="DBMonitor.DBMonitor"

Hans
Posts: 52
Joined: Wed 24 Aug 2005 20:05

Post by Hans » Fri 06 Jul 2007 09:44

I followed all steps but the problem exists!

Dropping a MySQLMonitor component results again in the same error. In the MySQL Menu in Delphi you still see the option "Download DBMonitor", so it does not recognize the installed DBMonitor.

best regards,
Hans

THis is what you see in the Registry:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{89F49E65-F6E0-11D6-9038-00C02631BDC7}]
@=""

[HKEY_CLASSES_ROOT\CLSID\{89F49E65-F6E0-11D6-9038-00C02631BDC7}\InprocServer32]
@="C:\PROGRA~1\CoreLab\DBMONI~1\DBMONI~1.DLL"
"ThreadingModel"="Both"

[HKEY_CLASSES_ROOT\CLSID\{89F49E65-F6E0-11D6-9038-00C02631BDC7}\ProgID]
@="DBMonitor.DBMonitor"

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 09 Jul 2007 06:46

Please perform one more test. Execute the code below in a new application like you did before. There is the OpenKey function replaced with the OpenKeyReadOnly in the code.

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
const
  Class_DBMonitor: TGUID = '{89F49E65-F6E0-11D6-9038-00C02631BDC7}';
begin
  with TRegistry.Create do begin
    RootKey := HKEY_CLASSES_ROOT;
  {$IFDEF CLR}
    if OpenKeyReadOnly('CLSID\{' + GUIDToString(Class_DBMonitor) + '}\InprocServer32') then
  {$ELSE}
    if OpenKeyReadOnly('CLSID\ + GUIDToString(Class_DBMonitor) + '\InprocServer32') then
  {$ENDIF}
     MessageDlg('Class_DBMonitor found', mtInformation, [mbOK], 0)
   else
     MessageDlg('Class_DBMonitor not found', mtError, [mbOK], 0);
  end;
end;

Hans
Posts: 52
Joined: Wed 24 Aug 2005 20:05

Post by Hans » Mon 09 Jul 2007 17:00

Thanks for helping again!

After i have installed DBMonitor 2.10 a run your code. The result was :

'Class_DBMonitor found'.

That's good news i think.

best regards,
Hans

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 10 Jul 2007 07:02

Thank you very much for your assistance. The reason of this problem is that MyDAC is not allowed to write to the system registry. This may happen because of the limited user's account in your operating system. We will fix this problem in the next MyDAC build. You can temporarily give more permissions for your current user to make TMySQLMonitor work.

Post Reply