FIX: You may receive error messages when you have an application that connects to Visual FoxPro data by using OLE DB Provider for Visual FoxPro (896170)
The information in this article applies to:
- Microsoft Visual FoxPro 9.0 Professional Edition
- Microsoft OLE DB Provider for Visual FoxPro 9.0
- Microsoft Visual FoxPro 8.0 SP1
- Microsoft Visual FoxPro 8.0
- Microsoft OLE DB Provider for Visual FoxPro 8.0
- Microsoft Visual FoxPro for Windows 7.0 SP1
- Microsoft Visual FoxPro for Windows 7.0
- Microsoft OLE DB Provider for Visual FoxPro 7.0
SYMPTOMSConsider the following scenario. You have an application that connects to Microsoft Visual FoxPro data by using Microsoft OLE DB Provider for Visual FoxPro. If this application depends on a specific default directory being set, you may receive error messages. For example, when a Microsoft Visual Basic .NET application tries to perform a compilation, the application may fail, and you may receive the following error message: "Cannot execute program" CAUSEWhen OLE DB Provider for Visual FoxPro executes SQL commands, OLE DB Provider for Visual FoxPro temporarily changes the application default directory to the path that is contained in the connection string Data Source property of the application. This change occurs only when you use a connection string Data Source property that is configured for free tables. OLE DB Provider for Visual FoxPro executes SQL commands in the following steps: - The existing application default directory is stored.
- The application default directory is changed to the path that is contained in the connection string Data Source property. The data source must be a free table directory.
- The command is executed.
- The previous application default directory is restored.
If you have multiple clients connecting at the same time, the application default directory may be changed to the path that is contained in the connection string Data Source property for the duration of the application process. RESOLUTIONA supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Visual FoxPro 9.0 service pack that contains this hotfix. To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site: Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel. Date Time Version Size File name
-------------------------------------------------------
23-Mar-2005 02:56 9.0.0.2722 1,769,472 Vfpoledb.dll WORKAROUNDTo work around this problem, use one of the following methods that do not require the hotfix: - Use a connection string Data Source property that references a Visual FoxPro database (.dbc) file instead of a connection string that references a free table directory.
- Use the full path of each table in the following SQL statements:
- The SELECT statement
- The INSERT statement
- The UPDATE statement
- The DELETE statement
For example, consider the following code. myOleDbConnection = New OleDbConnection("provider=vfpoledb.1;data source=\\server\share\datadir")
myOleDbCommand = New OleDbCommand("SELECT * from mytable", myOleDbConnection) Change this code to the following code. myOleDbConnection = New OleDbConnection("provider=vfpoledb.1;data source=\\server\share\datadir")
myOleDbCommand = New OleDbCommand("SELECT * from \\server\share\datadir\mytable", myOleDbConnection)
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Minor | Last Reviewed: | 7/25/2006 |
---|
Keywords: | kbQFE kbpubtypekc KB896170 kbAudDeveloper |
---|
|