New and updated features in the OLE DB Provider for Visual FoxPro 9.0 (894012)



The information in this article applies to:

  • Microsoft Visual FoxPro 9.0 Professional Edition

INTRODUCTION

With the release of Microsoft Visual FoxPro 9.0, a new version of the Microsoft OLE DB Provider for Visual FoxPro is now available. The OLE DB provider is installed when Visual FoxPro 9.0 is installed and is typically saved in the C:\Program Files\Common Files\System\Ole DB folder. It is a single file that is named VfpOleDb.dll and is version 9.0.0.2412. To download the OLE DB provider for free, visit the following Microsoft Web site:.

MORE INFORMATION

Software updates

The following problems are resolved in the OLE DB Provider for Visual FoxPro 9.0:
  • The SELECT INTO TABLE command fails without an error message. Also, the CREATE TABLE command works fine.
  • You do not receive an error message when you try to create a database by using the OLE DB provider.
  • You receive an "OLE object may be corrupt" error message when you open a connection to a table and then execute a stored procedure.
  • A connection to an exclusively open database (.dbc) fails and then you are connected to the parent folder. The expected behavior is for the connection should fail completely and not connect to a folder instead.
  • You receive an incorrect error message in a stored procedure. Instead, you receive a secondary error message.
  • The ADO.NET OleDbCommandBuilder.GetUpdateCommand method fails when a parameterized query is used with the OLE DB Provider for Visual FoxPro.
  • The OLE DB Provider for Visual FoxPro does not support the SET REFRESH command, the SYS(3050) function, or the SYS(1104) function.
  • When you execute the DROP TABLE command through the OLE DB Provider for Visual FoxPro, the command does not drop the table or report an error message.
  • You cannot query SET("ANSI") by using the OLE DB Provider for Visual FoxPro.
  • The stand-alone Web Setup package for the OLE DB Provider for Visual FoxPro has no label for the "custom" setup option.
  • The stand-alone installation package for the OLE DB Provider for Visual FoxPro writes values to the following registry hives:
    • HKEY_CURRENT_USER
    • HKEY_USERS
    It should write registry values to the following hives:
    • HKEY_LOCAL_MACHINE
    • HKEY_CLASSES_ROOT
  • A memory leak occurs in the OLE DB Provider for Visual FoxPro when it is used with the ADO.NET DataReader, OleDbDataAdapter, or ActiveX Data Objects (ADO) in high-availability implementations such as Web applications.
  • You receive an "Unspecified error" error message in the OLE DB Provider for Visual FoxPro under certain circumstances when you run the INSERT INTO command.
  • The CHR(0) command is treated as a string terminator for CHARACTER data. This causes random data to be sent to MEMO/CHARACTER BINARY fields through the OLE DB Provider for Visual FoxPro.
  • When you use the OPEN method of the ADODB.RecordSet object together with the OLE DB Provider for Visual FoxPro to open a FoxPro table, you receive the following error message:
    Exception code c0000005. OLE object may be corrupt
  • The ADODB Connection.OpenSchema method returns a corrupted recordset when the table name of the data source is more than 128 characters long..
  • You receive error messages when you set the properties of an open ADODB.Connection object. The ADODB.Connection object uses the OLE DB Provider for Visual FoxPro.
  • You receive the following error message from a SQL linked server through the OLE DB Provider for Visual FoxPro:
    ColumnName was reported to have a PRECISION of N at compile time and N at run time
  • The MODE property on the ADODB.Connection object is ignored by the OLE DB Provider for Visual FoxPro when a table is provided as the data source.

Behavior changes and additions

The following changes and additions have been made to the OLE DB Provider for Visual FoxPro. For additional information about Visual FoxPro 9.0 language elements, see the Visual FoxPro product documentation at the following Microsoft Developer Network (MSDN) Web site:
  • The following Visual FoxPro functions are now available in the OLE DB Provider for Visual FoxPro:
    • CursorToXML
    • XMLToCursor
    • XmlUpdategram
    Note The XMLToCursor function has an Microsoft XML Parser (MSXML) 3 dependency. Therefore, computers that only have the OLE DB Provider for Visual FoxPro installed must also have MSXML 3 installed. The stand-alone Setup program for the OLE DB Provider for Visual FoxPro that is available on the Web does not install MSXML 3.
  • The Visual FoxPro EXECSCRIPT function is now available in the OLE DB Provider for Visual FoxPro.
  • You can now return more than just a scalar value from a Visual FoxPro stored procedure. To enable this behavior, the following new functions have been added to the Visual FoxPro language:
    • SETRESULTSET
    • GETRESULTSET
    • CLEARRESULTSET
    The SETRESULTSET function lets you retrieve a rowset that is created from a marked cursor or retrieve a table from a database container (DBC) stored procedure when the OLE DB Provider for Visual FoxPro finishes command execution.
  • As with the Visual FoxPro language itself in Visual FoxPro 9.0, the OLE DB Provider for Visual FoxPro also includes Long Type Name Support in certain data-centric functions and commands. For example, the following CREATE TABLE command is now supported in the OLE DB Provider for Visual FoxPro:
    CREATE TABLE Test (PKID Integer, FNAME VARCHAR, LNAME VARCHAR, HireDate Date, Notes MEMO) 
    Notice the long names for the data types.
  • The Visual FoxPro SET REFRESH command is now supported inside the OLE DB Provider for Visual FoxPro. This support includes the following commands in the Config.fpw file that is read by the OLE DB Provider for Visual FoxPro:
    • SET REFRESH
    • SET("REFRESH")
    • REFRESH=
    Note When you use the SET("REFRESH") command by using an OLE DB Provider for Visual FoxPro connection without any parameters, the return value is always 0 (zero). You should use the SET("REFRESH",1) command.
  • The following Visual FoxPro functions are now enabled in the OLE DB Provider for Visual FoxPro:
    • SYS(3050)
      This function sets the foreground or background buffer memory size.
    • SYS(1104)
      This function purges memory that has been cached by programs and data. The function also clears and refreshes buffers for open tables.

REFERENCES

For additional information, see the Visual FoxPro product documentation at the following Microsoft Developer Network (MSDN) Web site:

Modification Type:MajorLast Reviewed:2/24/2005
Keywords:kbinfo KB894012 kbAudDeveloper