error 3011 when i would like open a .dbf to import in access.

G

Guest

Hi,
we have some dbf file to import in an access database. The error come
when i try to import a dbf table in my new database access. All of my dbf
file have long name more then 8 caracter and the extension is not include.
Each time i come to importe a file, microsoft access make an error message.
Microsoft jet do not find the file check if you have make a space before the
name of the file or if the "_" is present. I know this is not the real error
message, but that a good preview.

After search we have find more information. When my name file is 8 caracter
or less all run correctly. On the microsoft web site i have find one post
about long name file problem with access and excel, when the file coming from
dbase 4 or 5. The software do note support long file name because the dbase
file run in dos name config. The post talk about solution . It talk to
download foxpro odbc drivers to the problem. We have tried this, but
nothing. I do not if this because we need another drivers or setup to work,
or the fox pro drivers is not the solution.

Any body have a solution for this ??

thank's a lot for your anwser
 
J

John Nurick

One thing to try is to use the shortname aliases that are automatically
generated by the operating system. For instance,

"C:\Documents and Settings\Fred\My Documents\Data file.dbf" might be
accessible as C:\DOCUME~1\FRED\MYDOCU~1\DATAFI~2.DBF.

You can see the short aliases by opening a command prompt and using the
DIR command; in recent versions of Windows use DIR /X. Under program
control you can retrieve them by calling the GetShortPathName() API
function.
 
G

Guest

I try this solution and it works so this hint resolve only a half of my
problem. The error 3011 do not pop in my screen and i dont need to change the
name of my dbf file when i would import the table in access. For this that's
work fine. But in access database the problem is the same. The new table have
take the dos short name, and i need the long name absolutly to work. Anybody
have a hint to import long name file in the database with no change.

thank's a lot
----------------------------------------------
 
J

John Nurick

If I understand you right, you can work round this by renaming the table
(manually or using VBA code) after you have imported the data.

I have no experience with the FoxPro ODBC drivers.
 

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