Help accessing foxpro dbf file
I need help accessing a DBF file that is in Foxpro. I am using Visual Basic .NET. I have the DBF file and a CDX file. I installed the Visual FoxPro OLE DB Provider 8. It seems to work when I create a connection and click 'Test Connection', but when I go to build a command, no tables show up. Any ideas?
Re: Help accessing foxpro dbf file
What is the connect string that you are using?
Re: Help accessing foxpro dbf file
This is the connection string. It was created by the connection creater in Visual Studio. I am told there is no security on the dbf file.
User ID=;DSN=;Collating Sequence=MACHINE;Data Source="C:\DOCUMENTS AND SETTINGS\USERNAME\MY DOCUMENTS\DIRECTORY\FOXPRO\DATABASES";Provider="VFPOLEDB";Cache Authentication=False;Mask Password=False;persist security info=False;Mode="Read|Share Deny None";Extended Properties=;Encrypt Password=False
Re: Help accessing foxpro dbf file
I never trust wizards.
This is the connection string for FoxPro, using .NET that http://www.connectionstrings.com/ has listed
Code:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\folder;Extended Properties=dBASE IV;User ID=Admin;Password="
Re: Help accessing foxpro dbf file
Hi, Try this
VB Code:
Imports System.Data
Imports System.Data.OleDb
Use this for connecting to DBF File
Dim myConn As New OleDbConnection("Provider=VFPOLEDB.1;Data Source=C:\YourPath\Your.dbf;Password="""";Collating Sequence=MACHINE")
Use this for connecting to DBC File
Dim myConn As New OleDbConnection("Provider=VFPOLEDB.1;Data Source=C:\YourPath\Your.dbc;Password="""";Collating Sequence=MACHINE")
Dim myDataAdapter As New OleDbDataAdapter
Dim DS As DataSet = New DataSet
myDataAdapter.SelectCommand = New OleDbCommand("Select * from Transactions", myConn)
myDataAdapter.Fill(DS, "Transactions")