Search code examples
ms-accessloggingregistryjet

Showplan.out in Windows 7 with MS-Access 2003 and multiple versions of Office installed?


I was looking for a way to log queries from a 3rd party proprietary ms-access database application that contains a front-end and a backend.

The database runs in MS-Access 2003. I read and followed the instructions mentioned in an article suggested in the answer to this question, with the intent of creating the showplan.out file to find out which tables were being accessed by a query.

When finding the registry key specified in the article: \\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\JET\4.0\Engines I noticed that the path was not present beyond JET, so I created the rest of the path including the DEBUG key with it's value set to ON.

I also know that the Office installation that I am using has multiple versions of Office / Access installed (2003 and 2010) and that someone in the past, before I got here, likely used a registry hack to enable the installation of both versions.

Oh, and "My Documents" where Showplan.out is supposed to appear is stored on an external roaming profile server as well.

Is it possible to get the Showplan.out to output on Windows 7 64-bit in some other way, or am I better off installing Office, on a clean VM, copying my databases on, and trying it from there?


Solution

  • Debug.Print CurDir
    

    That will print the current working directory as Access sees it. That is where you will find showplan.out. By default, this will be your My Documents directory, but there's no guarantee.

    It looks like you have set the correct path and key in the Windows registry. I believe the location @Remou linked to in his comment is for Access 2007 and later (i.e., .accdb files).

    UPDATE: Since you are on Windows 64, the actual registry key should be this:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Jet\4.0\Engines\Debug]
    "JETSHOWPLAN"="ON"