Microsoft KB Archive/149773

= Application Error With Microsoft Access ODBC Driver =

Article ID: 149773

Article Last Modified on 10/10/2006

-

APPLIES TO


 * Microsoft Excel 95a
 * Microsoft Excel 5.0c
 * Microsoft Query 2000

-



This article was previously published under Q149773



SYMPTOMS
If you use DDERequest to retrieve a list of tables from a Microsoft Access database, you may receive one of the following error messages, depending on which version of Microsoft Excel and Microsoft Query you are using:

Microsoft Excel version 5.0 or 5.0c and Microsoft Query version 1.0
MSQUERY caused a general protection fault in module MSQUERY.EXE at 0017:00003537

Microsoft Excel version 7.0 and 7.0a and Microsoft Query version 2.0
MSQRY32 caused an invalid page fault in module MSQRY32.EXE at 0137:0047e661



CAUSE
You may experience this behavior, if the following is true:


 * You are using the DDE request statement:

 = DDERequest(, _ "Tables///)"

Where  is the name of the variable assigned to hold the returned value,  is the DDE to Microsoft Query channel variable,  is the specified Data Source Name,  is the specified User Name, and  is the specified Database Name.

-and-
 * If at least one of the following is true:

- You are using the Microsoft Access 2.0 ODBC Driver from the ODBC 2.0 Driver Kit, the ODBC 3.0 Driver Kit, or the ODBC Drivers supplied with Microsoft Access 7.0.

-or-

- You are using the Microsoft Access 7.0 ODBC Driver from the ODBC 3.0 Driver Kit or the ODBC Drivers supplied with Microsoft Access 7.0.



WORKAROUND
You can avoid the error symptoms by leaving the User argument blank. The Table data will be returned based upon the currently connected User:

 DDERequest(, _ "Tables/<DataSourceName>//<Database>"

where <Table Array> is the name of the variable assigned to hold the returned value, <Channel> is the DDE to Microsoft Query channel variable, <DataSourceName> is the specified Data Source Name, and <Database> is the specified Database Name.

If you use a Table Array variable of TableArray, a Data Source Name of "Access 7.0 NWind", and a Database Name (location) of C:\Msoffice\Access\Samples\Northwind, then the DDERequest statement would look similar to the following:

TableArray = DDERequest("Access 7.0 NWind"// _ & "C:\MSOFFICE\ACCESS\SAMPLES\NORTHWIND")

<div class="references_section">