Results 1 to 9 of 9
  1. #1
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291

    How to work with .dbf file created by GIS

    Trying to get some information from a .dbf file that comes from GIS I tried several things and came up blank, does anyone have any experience with this? I tried opening up this file with access and it says "The Microsoft Access database engine could not find the object 'CABZ_Lines.dbf'." so GIS uses a different format. I can open it in excel, not sure if that helps in any way.
    Thanks for help.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you tried "importing" the .dbf file?

  3. #3
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291
    I tried
    DoCmd.TransferDatabase acImport, "dBase IV", "C:\Desktop\Junk\", acTable, "CABZ_Lines", "newTable"
    It gives me a runtime error '3011' The M A database engine could not find the object 'CABZ_Lines'.
    Now I tried opening a random excel file in 2003 and did a save as and saved in dbf IV format and used the same line of code and it worked. I then opened up the file GIS created "CABZ_Lines" in excel, did a save as and saved in dbf IV format and it failed again, which really confuses me.

    Thanks for taking a look at this.

  4. #4
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291
    Here is a jpg of the 2 files
    Top: Random personal file that code worked on (note: file did not have more than 9 columns, the rest were added by excel when saved as dbf)
    Bottom: GIS file that code did not work, similar format to the file on top

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by cowboy View Post
    I tried
    DoCmd.TransferDatabase acImport, "dBase IV", "C:\Desktop\Junk\", acTable, "CABZ_Lines", "newTable"
    It gives me a runtime error '3011' The M A database engine could not find the object 'CABZ_Lines'.
    Now I tried opening a random excel file in 2003 and did a save as and saved in dbf IV format and used the same line of code and it worked. I then opened up the file GIS created "CABZ_Lines" in excel, did a save as and saved in dbf IV format and it failed again, which really confuses me.

    Thanks for taking a look at this.
    I'm pretty sure you need to specify the .EXT when you call out the file to import.

  6. #6
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291
    I tried it with and without the .EXT and it seemed to work the same.

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is this a recurring project or a one shot deal? Have you tried using the wizard for the import?

  8. #8
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291
    What my overall design is, I have a Access database that has a list of all the line names in a project. Those lines are to be entered in a GIS mapping program and displayed. The project is going to take about a year so I wanted to write a function that checks to make sure the names that are listed in the Access database and the GIS are the same.
    Where would I find the import wizard in Access 2010?

    Another thing I tried that did not work for me was to try to assign the file as an ADODB object and open it as a recordset.

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by cowboy View Post
    Where would I find the import wizard in Access 2010?
    External Data>More...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. User created Hyperlink
    By kaylachris in forum Forms
    Replies: 3
    Last Post: 05-17-2010, 02:40 PM
  2. Replies: 1
    Last Post: 04-07-2010, 08:49 AM
  3. Replies: 0
    Last Post: 05-18-2007, 02:49 PM
  4. Best Way to Return a Newly Created Index?
    By Jerimiah33 in forum Programming
    Replies: 5
    Last Post: 09-06-2006, 12:22 PM
  5. Security icon created on desktop !!!
    By wasim_sono in forum Security
    Replies: 1
    Last Post: 02-07-2006, 09:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums