Open DBF file

Discussion in 'Microsoft Access Forms' started by Anatoly Kurilin, Oct 22, 2005.

  1. Hi, please help me. I've never done it before. How to to open an DBF file to
    read its data?

    Thanks in advance.
    AK
     
    Anatoly Kurilin, Oct 22, 2005
    #1
    1. Advertisements

  2. Arvin Meyer [MVP], Oct 22, 2005
    #2
    1. Advertisements

  3. Dear Arvin, I did realize. Shoud I use OpenDatabase method or create a
    link?
     
    Anatoly Kurilin, Oct 22, 2005
    #3
  4. Anatoly Kurilin

    Al Camp Guest

    Anatoly
    If your .dbf file data will continue to change in the future, then it's
    best to Link the table.
    If you are going to convert the .dbf file data into Access and maintain
    that data there, then Import.
    --
    hth
    Al Camp
    Candia Computer Consulting - Candia NH
    http://home.comcast.net/~cccsolutions
     
    Al Camp, Oct 23, 2005
    #4
  5. Al, I need to periodically read data from an DBF file which structure is
    permanent but its name and path change from reading to reading.
    Is it possible to do it without setting a link. For instance, using
    OpenDatabase method.
    If OpenDatabase is OK, please put some code because I tried and failed.

    I don't want to use a link to an DBF file becasue I don't know how to
    redirect it. The problem is that the name of an link to an DBF file changes
    along with the name of the file.
     
    Anatoly Kurilin, Oct 24, 2005
    #5
  6. Anatoly Kurilin

    Al Camp Guest

    Anatoly,
    Your missing the point...
    If the data in your dbf doesn't change... just the path does... then
    Import the data into Access.

    Even an OpenDatabase (if that was a legitimate solution) would also fail
    (as compared to linking) with the dbf moving all the time.
     
    Al Camp, Oct 24, 2005
    #6
  7. If you want to do it in code you can use the OpenDatabase methods and the
    Connect property (which is the last argument in the OpenDatabase method).
    You will still have the problem of supplying the path each time. I suggest
    just using the built in GUI as I described in my first post. It does the
    same thing as you would write in code. Linking is probably the better choice
    unless the data is unique each time. It that case, you may prefer to import
    that data.
    --
    Arvin Meyer, MCP, MVP
    Microsoft Access
    Free Access downloads:
    http://www.datastrat.com
    http://www.mvps.org/access
     
    Arvin Meyer [MVP], Oct 25, 2005
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.