FIX: Visual FoxPro ODBC Driver Creates an Invalid File DSN (172695)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual InterDev 1.0

This article was previously published under Q172695

SYMPTOMS

When trying to configure a Visual FoxPro file DSN a message similar to the following appears:
General error: Invalid file dsn 'Windows\ODBC\Data Sources\MyData.dsn'
When trying to make a connection to a Visual FoxPro database with a file DSN the following message appears:
[Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified

CAUSE

The Visual FoxPro ODBC driver incorrectly adds the entry "DSN=" to the file DSN.

RESOLUTION

To correct this problem, remove the "DSN=" line from the .dsn file. This file, by default, is located in the "\Windows\ODBC\Data Sources" directory.

Be aware that every time this DSN entry is configured using the ODBC Data Source Administrator, the .dsn file is rewritten along with the "DSN=" line. This means that any time you modify this DSN entry using the ODBC Data Source Administrator, you must also remove the "DSN=" line.

Some applications save the DSN information (including the "DSN=") when an ODBC connection is made. Even after the original file DSN is corrected, problems still occur when these connections are used. To correct this problem, delete and re-create the connection.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This has been corrected in Visual FoxPro 5.0a.

MORE INFORMATION

This problem is known to occur in the Visual FoxPro ODBC Driver versions 5.00.00402 and 5.00.00412.

Modification Type:MajorLast Reviewed:10/15/2003
Keywords:kbbug kberrmsg kbfix kbprb KB172695