Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Posts
    36

    Unanswered: Transferdatabase error

    Hello. I'm working on code that exports an Access table as a .dbf file. I keep getting an error 3044 claiming the path of the databasename is wrong. Here's the code:
    ----------------------
    DoCmd.TransferDatabase transfertype:=acExport, databasetype:="dbase 5.0", _
    databasename:="Q:\jeff2007con.mdb", _
    objecttype:=acTable, Source:="qc2rptma", _
    Destination:="Q:\dave1.dbf", structureonly:=False

    -------------------------------------------------------

    I tried variations of the path but they all fail. I even used Application.CurrentProject.FullName and that didn't work either. I did a search on dbforums and someone else had the same problem 4 years ago but no one answered her question. Anybody have any ideas? TIA.

  2. #2
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    If I'm not mistaken, Dbase 5.0 is a DOS program, and needs an 8.3 format for the filename. What you have (jeff2007con.mdb) is 11.3, and can't be used by DOS.

    Edit: I think what happens in that case is that DOS sees something like jeff20~1.mdb, and that's what it's looking for.

    Sam

  3. #3
    Join Date
    Aug 2004
    Posts
    36
    I tried a couple of other database types and they didn't work but when I went back to the help screen again I noticed that they want the name of the database you're exporting to. Dbase and Paradox and others don't have databases like Access does. All the files are in a folder. I created a folder and called that the database name but that didn't work either.

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    FYI
    Code:
    CurrentProject.Path
    
    Dir(CurrentProject.Path)
    George
    Home | Blog

  5. #5
    Join Date
    Aug 2004
    Posts
    36
    Okay, I figured it out. When I tried to export the table through the menu buttons, I received a "Cannot name a field twice" error. So I created a query and added the fields one at a time till I found out which fields were triggering the error. I renamed those fields, changed the command to export an acQuery, and it worked. dBase uses a limited number of characters in each field name and doesn't allow spaces. So thanks, guys.

Posting Permissions

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