PRB: VFP ODBC Driver Causes Various Errors in Microsoft Products (308215)



The information in this article applies to:

  • Microsoft ODBC Driver for Visual FoxPro 1.0
  • Microsoft ODBC Driver for Visual FoxPro 2.0
  • Microsoft ODBC Driver for Visual FoxPro 3.0
  • Microsoft ODBC Driver for Visual FoxPro 4.0
  • Microsoft ODBC Driver for Visual FoxPro 5.0
  • Microsoft ODBC Driver for Visual FoxPro (Build 6.00.8281.00) 1.0
  • Microsoft ODBC Driver for Visual FoxPro (Build 6.00.8281.00) 5.0
  • Microsoft ODBC Driver for Visual FoxPro (Build 6.00.8281.00) 6.0
  • Microsoft ODBC Driver for Visual FoxPro (Build 6.01.8629.01) 6.0

This article was previously published under Q308215

SYMPTOMS

When you use the Visual FoxPro ODBC driver to retrieve data, you may receive the following error messages in various Microsoft products:
  • If you use Visual FoxPro to retrieve data from a FoxPro table using the Remote View Designer, you receive the following error message:
    Connectivity Error: [Microsoft] [ODBC Visual FoxPro Driver] Invalid cursor state.
  • If you use Microsoft Access to link or import to the FoxPro table, you receive the following error message:
    ODBC--Call Failed.
  • If you access the FoxPro table using Microsoft Word or Microsoft Excel, you receive the following error message:
    General ODBC Error.
    Followed by:
    Couldn't read this file.
    NOTE: This error assumes that Word and Excel are using the Microsoft Query interface to retrieve the data.
If you use a Visual Basic 6.0 application to access Visual FoxPro data, you may receive the following error message:
ODBC Error: Cannot open file <drive letter>\<folder>\*.tmp
NOTE: Where <drive letter> represents the drive and <folder> represents the folder that Windows uses to store its temp files.

CAUSE

These errors occur because the System attribute is set at the TEMP folder of the computer. This error seems to occur only on Microsoft Windows NT 4.0, Microsoft Windows 2000, and Microsoft Windows XP operating systems.

RESOLUTION

From a command prompt, issue the ATTRIB -S C:\WINNT\TEMP command to remove the System attribute from the TEMP folder. This assumes that the C:\WINNT\TEMP folder is the default for the TEMP and TMP environment variables. To determine this, right-click the My Computer icon on the desktop, click Properties, click Advanced, and then click Environment Variables. Look at the TEMP and TMP variables in the System Variables list box to determine which folder the variables are pointing to and then issue the ATTRIB command on this folder.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Use the MS-DOS ATTRIB command to set the System attribute for the TEMP folder. For example, the syntax for a folder that is named "temp" on drive C would be as follows:

    ATTRIB +S c:\temp

  2. Use the Visual FoxPro ODBC driver to create a data source name (DSN) in the ODBC Administrator, and then point it to a Visual FoxPro table or a database container.
  3. Use the visual interface of any of the Microsoft products that are listed earlier to access the DSN that is pointing to the FoxPro table or database container.
  4. After selecting the DSN, the error appears, and the data will not be retrieved.

Modification Type:MajorLast Reviewed:12/3/2003
Keywords:kbprb KB308215