ACC2000: ODBC Call Failed (#200) Error Running a Union Query on Linked Visual FoxPro Tables

ID: Q244904


The information in this article applies to:
  • Microsoft Access 2000

Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access database (.mdb).


SYMPTOMS

When you run a union query with two linked Microsoft Visual FoxPro tables, you may receive the following error message:

ODBC call failed [Microsoft] [ODBC Visual F(#200)]


RESOLUTION

Instead of using linked tables, create a SQL pass-through query that uses the Microsoft Visual FoxPro ODBC driver to perform the union query. To do so, follow these steps:

  1. Create a data source that uses the Visual FoxPro ODBC driver:


    1. Start the ODBC Data Source Administrator.


    2. Click Add to add a data source.


    3. In the list of drivers, click Microsoft Visual FoxPro Driver, and then click Finish.


    4. In the ODBC Visual FoxPro Setup dialog box, type a data source name and a description.


    5. Click Free Table directory, and then type or browse to the directory of free tables to which the data source connects.


    6. Click OK to close the ODBC Visual FoxPro Setup window.


    7. Click OK again to quit the ODBC Data Source Administrator.


  2. Under Objects, click Query, and then click New.


  3. In the New Query window, click Design View, and then click OK.


  4. Microsoft Access displays the Show Table dialog box. Without adding tables or queries, click Close.


  5. On the Query menu, point to SQL Specific, and then click Pass-Through. Microsoft Access displays the SQL Pass-Through Query window.


  6. Type the code for the union query in the SQL Pass-Through Query window. The following is an example. In the example, "LinkedVFoxProTable1" and "LinkedVFoxProTable2" are the names of the two tables.


  7. 
    SELECT * FROM LinkedVFoxProTable1
    UNION
    SELECT * FROM LinkedVFoxProTable2 
  8. Run the query. Note that the query runs without errors and returns the recordset.



STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

  1. In an open Access 2000 database, link two Visual FoxPro files.


  2. Create the following union query:


  3. 
    SELECT * FROM LinkedVFoxProTable1
    UNION
    SELECT * FROM LinkedVFoxProTable2 
  4. Run the query. Note that you receive the following error message:


  5. ODBC call failed [Microsoft] [ODBC Visual F(#200)]

Additional query words: pra attached err

Keywords : kberrmsg kbdta
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: January 6, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.