DAO and dBaseIV

Posted on 2000-04-03
Medium Priority
Last Modified: 2013-12-25
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.

Question by:electrick
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 70

Expert Comment

by:Éric Moreau
ID: 2680865

Author Comment

ID: 2680935
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)

LVL 70

Expert Comment

by:Éric Moreau
ID: 2680998
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.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 2681133
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.

LVL 70

Accepted Solution

Éric Moreau earned 800 total points
ID: 2681179
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
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?

Author Comment

ID: 2681306
Yep, your right.  I made it work too.
The only thing I changed was the False param in the 2nd argument.



Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question