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\akt txt.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(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
con.ConnectionS tring = "PROVIDER=Micro soft.Jet.OLEDB. 4.0;Data Source=D:\temp\ Mijn Documenten\SDT\ SDT Klantentool\SDT Klantentool\akt txt.dbf;Extende d Properties=""dB ASE IV;"";"
'Open the database
con.Open() 'Here the error comes up!
sql = "SELECT * FROM akttxt"
da = New OleDb.OleDbData Adapter(sql, con)
da.Fill(ds, "AktTxt")
con.Close()
MaxRows = ds.Tables("AktT xt").Rows.Cou nt
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
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\akt txt.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(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
con.ConnectionS tring = "PROVIDER=Micro soft.Jet.OLEDB. 4.0;Data Source=D:\temp\ Mijn Documenten\SDT\ SDT Klantentool\SDT Klantentool\akt txt.dbf;Extende d Properties=""dB ASE IV;"";"
'Open the database
con.Open() 'Here the error comes up!
sql = "SELECT * FROM akttxt"
da = New OleDb.OleDbData Adapter(sql, con)
da.Fill(ds, "AktTxt")
con.Close()
MaxRows = ds.Tables("AktT xt").Rows.Cou nt
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
Comment