Microsoft KB Archive/118657

{|
 * width="100%"|

GP Fault Exiting MS Query After Canceling Get External Data

 * }

-

The information in this article applies to:


 * Microsoft Query for Windows, version 1.0
 * Microsoft Excel for Windows, version 5.0

-

SYMPTOMS
When you use the Get External Data command in Microsoft Excel to link to a query in Microsoft Query, and you then cancel the query and exit Microsoft Excel, you receive a general protection (GP) fault when you exit Microsoft Query.

CAUSE
This error occurs when you exit Microsoft Excel before you exit Microsoft Query when the query that you linked to does not contain any data.

The Get External Data command is available in Microsoft Excel when you open or load the MS Query add-in file (XLQUERY.XLA). This command allows you to link to a query, update or change the query, and return the results to the worksheet in Microsoft Excel. However, if you use the Get External Data command, and you switch back to Microsoft Excel by pressing ALT+TAB or by using the Task List (CTRL+ESC), you see the hourglass displayed in Microsoft Excel. This is because of the pending DDE channel between the two applications. If you then cancel the link to the query by pressing ESC in Microsoft Excel, and you then exit Microsoft Excel, if the query does not contain any data, you receive a GP fault when you exit Microsoft Query.

The problem occurs because the DDE channel to Microsoft Query is not terminated properly in this case.

WORKAROUNDS
To avoid receiving a GP fault when you cancel a link to a query that is initiated by using the Get External Data command in Microsoft Excel, exit Microsoft Query before you exit Microsoft Excel.

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel version 5.0c for Windows.