Microsoft KB Archive/894012

= New and updated features in the OLE DB Provider for Visual FoxPro 9.0 =

Article ID: 894012

Article Last Modified on 3/14/2007

-

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:

http://www.microsoft.com/downloads/details.aspx?FamilyId=E1A87D8F-2D58-491F-A0FA-95A3289C5FD4&displaylang=en

.



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 &quot;OLE object may be corrupt&quot; 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.</li> 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.</li> You cannot query SET(&quot;ANSI&quot;) by using the OLE DB Provider for Visual FoxPro.</li> The stand-alone Web Setup package for the OLE DB Provider for Visual FoxPro has no label for the &quot;custom&quot; setup option.</li> The stand-alone installation package for the OLE DB Provider for Visual FoxPro writes values to the following registry hives: <ul>  </li>  </li></ul>

It should write registry values to the following hives: <ul>  </li>  </li></ul> </li> 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.</li> You receive an &quot;Unspecified error&quot; error message in the OLE DB Provider for Visual FoxPro under certain circumstances when you run the INSERT INTO command.</li> 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.</li> 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

</li> The ADODB Connection.OpenSchema method returns a corrupted recordset when the table name of the data source is more than 128 characters long..</li> 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.</li> You receive the following error message from a SQL linked server through the OLE DB Provider for Visual FoxPro:

was reported to have a PRECISION of  at compile time and   at run time

</li> <li>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.</li></ul>

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:

http://msdn2.microsoft.com/en-us/library/ms950411.aspx

<ul> <li>The following Visual FoxPro functions are now available in the OLE DB Provider for Visual FoxPro: <ul> <li>CursorToXML</li> <li>XMLToCursor</li> <li>XmlUpdategram</li></ul>

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.</li> <li>The Visual FoxPro EXECSCRIPT function is now available in the OLE DB Provider for Visual FoxPro.</li> <li>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: <ul> <li>SETRESULTSET</li> <li>GETRESULTSET</li> <li>CLEARRESULTSET</li></ul>

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.</li> <li> 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. </li> <li>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: <ul> <li>SET REFRESH</li> <li>SET(&quot;REFRESH&quot;)</li> <li>REFRESH=</li></ul>

Note When you use the SET(&quot;REFRESH&quot;) 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(&quot;REFRESH&quot;,1) command.</li> <li>The following Visual FoxPro functions are now enabled in the OLE DB Provider for Visual FoxPro: <ul> <li>SYS(3050)

This function sets the foreground or background buffer memory size.</li> <li>SYS(1104)

This function purges memory that has been cached by programs and data. The function also clears and refreshes buffers for open tables.</li></ul> </li></ul>

<div class="references_section">