.dbf file import problems

J

J.Scott

I have a .dbf file that I am trying to import to Access. I have tried
multiple ways to open this file and without fail, I get the error message
"The Microsoft Jet database engine could not find the object '*.dbf'. Make
sure the object exists and that you spell its name and the path name
correctly."

Additionally it does not seem to matter which kind of dbf file I try to
bring it in as (db3, db4, or db5). This is a very large file with around 2.1
million lines of data.

Thanks for the help

Scott
 
J

John Nurick

Hi Scott,

This can happen if the dbf file has a long name or if the total length
of the path to it is greater than (I think) 64 characters. Try using the
equivalent short ("DOS") filespec, which you can get with a function
like this:


Function GetShortPath(FileSpec As String) As String
Dim fs As Object, f As Object

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(FileSpec)
GetShortPath = f.ShortPath
End Function
 
J

Joe Fallon

You have to use DOS 8.3 file names for dBase files.
Also, the column names in the file have to be 10 characters or less with no
special characters in them.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top