DAO and dBaseIV

Anybody know how to open (not link) a dBaseIv database using DAO code?

I've used the samples from MSDN Online
but that just links to a mdb database.

I can create a link using the Connect property, but I only get one record.

Thanks,
Rick
electrickAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
I just tried the code from the link I gave to you:

Private Sub Command1_Click()
Dim db As Database
Dim rs As Recordset

    Set db = OpenDatabase("C:\apps\office\", False, False, "dbase IV;")
    Set rs = db.OpenRecordset("clients")
    Do While Not rs.EOF
        Debug.Print rs.Fields(0).Value
        rs.MoveNext
    Loop
End Sub

It works like it should!

Again, I ask you to show the code. It could be a simple thing that we can't explain unless we see how you use it!

Do you have write access to the folder that contains your DBF file?
0
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
electrickAuthor Commented:
Thanks, but that's not the problem. All filenames are 8 chars or less.

I get error 3051 saying the database is opened exclusively by another user. (Which is not true)

0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Éric MoreauSenior .Net ConsultantCommented:
I put this link for you to have a sample.

What is the value of your 3rd parameter? It must be set to False.

Show me your code.
0
 
electrickAuthor Commented:
I've already printed and used the samples provided by MSDN.

Yes the 3rd parameter is False (that's the default)

My code is the same as all of the MSDN samples.  None of them work.

What I'm looking for is code from someone who has made this work.

Thanks,
Rick
0
 
electrickAuthor Commented:
Yep, your right.  I made it work too.
The only thing I changed was the False param in the 2nd argument.

Thanks,

Rick
0
All Courses

From novice to tech pro — start learning today.