You are currently offline, waiting for your internet to reconnect

Dual Processor Computer Hangs When Running Query

This article was previously published under Q178650
This article has been archived. It is offered "as is" and will no longer be updated.
Novice: Requires knowledge of the user interface on single-user computers.

When you try to run a large, complex, select query or a large action querysuch as a make-table query on a dual processor computer, the query does notfinish processing, and Microsoft Access stops responding (hangs). If youmonitor the system, you see that the processor time drops to between 0% and1% shortly after the query begins running. However, you can pressCTRL+BREAK to terminate the query, and Microsoft Access functions normally.This behavior also occurs if you try to import a delimited text file thatis 70 megabytes (MB) or larger.

You can run the same query or import the same text file on a singleprocessor computer.
There are two resolutions and one workaround to this problem.

Install Microsoft Office 97 Service Release 2

Obtain and install the Microsoft Office 97 Service Release 2. For more information about getting this Service Release, see the followingarticle in the Microsoft Knowledge Base:
151261 OFF97: How to Obtain and Install MS Office 97 SR-2

Install Microsoft Jet 3.51

Obtain Jet35sp3.exe from the Microsoft Web site; this file contains the updated version 3.51 of the Microsoft Jet database engine. For information about how to obtain Microsoft Jet 3.51, see the following article in the Microsoft Knowledge Base:
172733 ACC97: Updated Version of Microsoft Jet 3.5 Available for Download
To work around this problem, use only one processor if you intend to run large, complex queries or import large text files on a dual processor computer. Follow either of these methods to use only one processor.

Method 1

  1. Press CTRL+ALT+DEL, and then click Task Manager.
  2. Click the Processes tab.
  3. Right-click MsAccess.exe, and then click Set Affinity.
  4. Click to clear either CPU0 or CPU1.
  5. Click OK, and then close Task Manager.

Method 2

  1. Create a new database.
  2. Create a new form.
  3. Add a command button named Command0.
  4. Click Code on the View menu.
  5. Type the following code:
    Option Compare DatabaseOption ExplicitPrivate Declare Function SetProcessAffinityMask Lib "kernel32" _   (ByVal hProcess As Long, ByVal dwProcessAffinityMask As Long) As LongPrivate Declare Function GetProcessAffinityMask Lib "kernel32" _   (ByVal hProcess As Long, lpProcessAffinityMask As Long, _   lpSystemAffinityMask As Long) As LongPrivate Declare Function GetCurrentProcess Lib "kernel32" () As LongPrivate Declare Function OpenProcess Lib "kernel32" _   (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, _   ByVal dwProcessId As Long) As LongPrivate Declare Function CloseHandle Lib "kernel32" _   (ByVal hObject As Long) As LongPrivate Declare Function GetWindowThreadProcessId Lib "user32" _   (ByVal hwnd As Long, lpdwProcessId As Long) As LongPrivate Const PROCESS_SET_INFORMATION = (&H200&)Private Const PROCESS_QUERY_INFORMATION = (&H400&)Dim a As ObjectPrivate Sub Command0_Click()   Dim idThread As Long   Dim idProcess As Long   Dim ProcessAffinity As Long   Dim SystemAffinity As Long   Dim lRet As Long   Dim hProcess As Long   idProcess = Shell("C:\Program Files\Microsoft" & _      " Office\Office\MSACCESS.EXE" & _      " C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb", _      vbMaximizedFocus)   If idProcess Then      hProcess = OpenProcess(PROCESS_QUERY_INFORMATION Or _         PROCESS_SET_INFORMATION, False, idProcess)      lRet = GetProcessAffinityMask(hProcess, ProcessAffinity, _         SystemAffinity)      ProcessAffinity = 1 ' this sets the process to only run on CPU 0                          ' for CPU 1 only use 2 and for CPUs 1 & 2 use 3      lRet = SetProcessAffinityMask(hProcess, ProcessAffinity)      CloseHandle (hProcess)   End IfEnd Sub					
  6. Save the form, and then open the form in Form view.
  7. Click Command0.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.  This problem was corrected in Microsoft Jet 3.51.

For additional information about how to obtain Microsoft Jet Database Engine 3.51, click the article number below to view the article in the Microsoft Knowledge Base:
172733 Updated Version of Microsoft Jet 3.5 Available for Download

Steps to Reproduce Problem

  1. Start Microsoft Access on a dual processor computer and open the sample database Northwind.mdb.
  2. Create a new query in Design view.
  3. In the Show Table dialog box, click the Tables tab and select the Orders table.
  4. Click Add twice so that the Orders table is added to the query twice, and then click Close. Do not create a join between the tables.
  5. Drag the asterisk (*) from the Orders table into the query grid, and then drag OrderID from Orders_1 (the second instance of the Orders table) into the query grid.
  6. On the Query menu, click Run. The query should return over 688,000 records.
  7. On the View menu, click Design View.
  8. On the Query menu, click Make-Table Query.
  9. In the Make Table dialog box, type qryTestTable and click OK.
  10. On the Query menu, click Run. Note that Microsoft Access stops responding before the query finishes processing.
8.0 multi-processor multiprocessor pra

Article ID: 178650 - Last Review: 12/05/2015 08:15:41 - Revision: 3.1

Microsoft Access 97 Standard Edition

  • kbnosurvey kbarchive kbbug kbfix KB178650