|
-
Nov 4th, 2005, 01:01 PM
#1
Thread Starter
Fanatic Member
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?
-
Nov 4th, 2005, 01:07 PM
#2
Re: Help accessing foxpro dbf file
What is the connect string that you are using?
-
Nov 4th, 2005, 01:30 PM
#3
Thread Starter
Fanatic Member
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
-
Nov 4th, 2005, 02:01 PM
#4
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="
-
Nov 4th, 2005, 02:03 PM
#5
Lively Member
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")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|