Hi,
I want to acces a .dbf file with visual studio 2008 express edition, but it doesn't work.When I try to open the connection, i get the error message 'D:\temp\Mijn Documenten\SDT\SDT Klantentool\SDT Klantentool\akttxt.dbf' is no valid path', but I'm sure it's the right directory. The .dbf file is a dBase file, but i don't know which version (I tried III, IV, and 5.0) but always the same error message.
Here's the code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=D:\temp\Mijn Documenten\SDT\SDT Klantentool\SDT Klantentool\akttxt.dbf;Extended Properties=""dBASE IV;"";"
'Open the database
con.Open() 'Here the error comes up!
sql = "SELECT * FROM akttxt"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "AktTxt")
con.Close()
MaxRows = ds.Tables("AktTxt").Rows.Count
inc = -1
End Sub
Please can someone help me with this, it's been giving me headaches for days now! If you want I can send the 'akttxt.dbf' file to you.
best regards