retrive data from foxpro 2.6 memo field in c#.

  • Thread starter Thread starter eric
  • Start date Start date
E

eric

Hi
Does any one know how to retrive data from foxpro 2.6 memo field in c#. I
just manage to retrive the first row.

/Eric
 
So is your problem somehow connected to the memo field, or to your inability
to retreive more than one row? You message seems contradictory.

No one can possibly help you without much more info.

For example, are you using the desktop dBase ODBC driver, the Fox ODBC
driver, or the Fox OLE DB driver?

Are you trying to retreive via a DataAdapter or a DataReader? Which
library?

Where is the code that demonstrates your problem?

--Bob
 
Hi Eric,

How are you retrieving your data? You should be able to do it with the
Visual FoxPro OLE DB data provider, downloadable from
http://msdn.microsoft.com/vfoxpro/downloads/updates/default.aspx.

Here's some VB code that worked for me:

Module Module1
Sub Main()
Dim ConnString As String = "Provider=VFPOLEDB.1;Data Source=C:\My
Documents\Visual FoxPro Projects\test.DBC;Password="";Collating
Sequence=MACHINE"""
Dim con As New System.Data.OleDb.OleDbConnection(ConnString)
Dim cmd As New System.Data.OleDb.OleDbCommand("Select * From
TestTable1", con)

Try
con.Open()
Dim dr As System.Data.OleDb.OleDbDataReader = _
cmd.ExecuteReader()

While dr.Read()
System.Windows.Forms.MessageBox.Show(dr.Item(2).ToString)
End While
Catch e As Exception
System.Windows.Forms.MessageBox.Show(e.ToString)
End Try

End Sub
End Module
 
Back
Top