Microsoft KB Archive/326544

= BUG: Error When You Select an Empty Visual FoxPro Memo Field Using .NET OleDbDataAdapter and Visual FoxPro OLE DB Provider =

Article ID: 326544

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft OLE DB Provider for Visual FoxPro 9.0
 * Microsoft OLE DB Provider for Visual FoxPro 9.0

-



This article was previously published under Q326544



SYMPTOMS
The Microsoft OLE DB Provider for Visual FoxPro can access Visual FoxPro data from Microsoft Visual Studio .NET projects. When you use the OleDbDataAdapter object from the System.Data.OleDb namespace, and your SQL SELECT statement returns an empty Visual FoxPro memo field, you receive the following error message:

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Behavior
On a computer that has Visual Studio .NET and the OLE DB Provider for Visual FoxPro installed (version 7.0.0.9262 or 7.0.0.9465), follow these steps:  In Visual Studio .NET, create a new Microsoft Visual Basic .NET Console Application project.  Replace the default Module1 code with the following: Imports System.Data.OleDb

Module Module1

Sub Main ' Demonstrates a problem with the Microsoft OLE DB Provider for Visual FoxPro ' interacting with the OleDbDataAdapter object and empty FoxPro memo fields. Dim ThisDir As String = System.AppDomain.CurrentDomain.BaseDirectory Dim oConn As New OleDbConnection(&quot;Provider=VFPOLEDB.1;Data Source=&quot; & ThisDir) Dim oCMD As New OleDbCommand Dim oDA As New OleDbDataAdapter(&quot;SELECT fldMEMO FROM Q326544&quot;, oConn) Dim oDS As New DataSet

' Create a Visual FoxPro table with one memo field, and then insert a blank record. With oCMD .Connection = oConn .Connection.Open .CommandType = CommandType.Text .CommandText = &quot;CREATE TABLE Q326544 (fldMEMO M)&quot; .ExecuteNonQuery .CommandText = &quot;INSERT INTO Q326544 VALUES ([])&quot; .ExecuteNonQuery .Connection.Close End With

Try oDA.Fill(oDS) Catch oER As Exception MsgBox(oER.Message) End Try

oDA.Dispose oConn.Close oConn.Dispose oCMD.Dispose End Sub End Module  Press F5 to run the project.

You receive the error message that is described in the &quot;Symptoms&quot; section.

Keywords: kbbug kbpending KB326544

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.