Results 1 to 10 of 10
  1. #1
    Join Date
    Dec 2008
    Posts
    3

    Unanswered: Linking table to dbase file that doesn't have .dbf extension

    Does anyone know how to link a table to a dbase format file, if the file does not have a .dbf extension?

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Rename the file to a *.dbf extension.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I've not tried it, but couldn't you create the link with code?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Dec 2008
    Posts
    3
    The file is a Mapinfo .DAT file, so if I rename it, then the proprietary GIS packge I use won't link to the file.

    There probably is a way to write code to read the file, but surely there's a way that I can edit the link setting so that the extension of the file name specified in the link does not have to be .dbf.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so copy the file to a dbf extension....
    then both packages will be happy
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Quote Originally Posted by ianhay
    The file is a Mapinfo .DAT file, so if I rename it, then the proprietary GIS packge I use won't link to the file.

    There probably is a way to write code to read the file, but surely there's a way that I can edit the link setting so that the extension of the file name specified in the link does not have to be .dbf.
    I'm pretty sure that in order for MSAccess to link to the file, it must have a *.dbf extension. As healdem pointed out, perhaps you can write a vb script or something to automatically copy the file to a *.dbf extension.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  7. #7
    Join Date
    Dec 2008
    Posts
    3
    I realise that I can write code to copy the file and give it a dbf extension, but there may be issues when multiple users are using the database and the code tries to copy the file and someone else already has it open.

  8. #8
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    You could schedule the vbscript through Task Schedular so it runs at midnight or a time when no one is in it. If you don't have that option, think of just having 2 mdb's. One for reports, the other for importing/etc. The table it's importing to can be linked into other mdbs.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  9. #9
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    ▲ No! You should know this better than anyone PK!!

    You could code the launching script to copy the data file to a file that includes the username; IE, when a user opens the database, have the file copied to MAPINFO - Username.dbf and then the access database can link to that.

    Used in conjunction with the file replication launch method (cloning file launcher -- whatever PK called it ^^) it would work perfectly. The data file and the application file would be copied for each user, so updating the data would be as easy as closing and relaunching the application.

    The only tricky part is having access know which file to link to, which should be easy IF you use the cloning launcher, you could just use the current filename to figure out which file to link to.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  10. #10
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Quote Originally Posted by StarTrekker
    ▲ No! You should know this better than anyone PK!!
    .

    Que? Did I write something bad?
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •