473,387 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

DoCmd.TransferText bug

Seth Schrock
2,965 Expert 2GB
Has anyone else run into a situation where DoCmd.TransferText doesn't work when the .CSV file name has extra periods in it (i.e. "1102141908270.FE010.CSV")? If I import it with that name, I get the following error: The Microsoft Access database engine could not find the object '1102142003010.FE010.CSV'. Make sure the object exists and that you spell its name and the path name correctly. If '1102142003010.FE010.CSV' is not a local object, check your network connection or contact the server administrator. If I remove the first period, then it imports fine.

These files are downloaded from the Internet, so I have no control over the file names. Is there anything that I can do besides renaming the file using code?
Nov 16 '18 #1

✓ answered by NeoPa

Hi Seth.

As Twinny says, renaming seems to be a workable approach.

Find the error number for that problem and handle it in code either by :
  • Copy; Import; Delete.
  • Rename; Import; Rename back.

8 2224
twinnyfo
3,653 Expert Mod 2GB
Seth,

My solution would be to rename the files using code. I haven’t experienced that exact problem, but have experienced other file name issues. So, if I know there “might” be an issue, I find my list of files, cycle through all of them, searching for rascally naming issues, correct them, and then use the file.

It is an additional step that may only apply to some of my files, but in the end, it prevents other hang ups in the code.

Hope that hepps!
Nov 17 '18 #2
NeoPa
32,556 Expert Mod 16PB
Hi Seth.

As Twinny says, renaming seems to be a workable approach.

Find the error number for that problem and handle it in code either by :
  • Copy; Import; Delete.
  • Rename; Import; Rename back.
Nov 17 '18 #3
Seth Schrock
2,965 Expert 2GB
I hadn't thought of the option to rename it back to the original name after I was done importing the file or of copying the file with a usable name and then deleting it. I think the later will be my choice as I can always fall back to the unchanged file if an error causes a failure before I can change it back.
Nov 19 '18 #4
Brilstern
208 100+
Hi Seth,

Unfortunately this is a known bug in MS Access. Some of those little bugs are irritating, but at least this one has an easy work around.
Nov 19 '18 #5
Seth Schrock
2,965 Expert 2GB
One would think that it would be an easy fix for Microsoft as well.
Nov 19 '18 #6
Brilstern
208 100+
"one would think"

#microshaftwindblows
Nov 19 '18 #7
NeoPa
32,556 Expert Mod 16PB
Bear in mind that a Rename is far quicker to execute on any large file. Also, I would say just as easy to recover from if it errors. You just have to make sure you rename it back regardless.

OTOH both methods work, so go with what suits you best.
Nov 20 '18 #8
Seth Schrock
2,965 Expert 2GB
Usually, the files are very small (about 3KB), so I don't think that copying will be a problem, but that is a good consideration.
Nov 20 '18 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Teresa | last post by:
I'm trying to import a tab delimited text file. The text file does not have column heading. I can give it column heading if needed. How do I change the defult comma delimited to tab? If I...
3
by: holdemfoldem | last post by:
Hi. I'm new to this board and have a few questions about using the method referred to in the topic of this message. I have manually transferred over 1/2 million records from a text file into my...
0
by: Chris | last post by:
Hi, I am using the command below for exporting data to text file. One of the query columns has SINGLE number type with decimal ponts as auto. DoCmd.TransferText acExportDelim,...
14
PEB
by: PEB | last post by:
Hi all, Yesterday i've tried this command: DoCmd.TransferText acExportDelim, "Comma_SEP", "myquery", "D:\Temp\Temp.txt" And it gave me an Error that can't find "D:\Temp\Temp.txt" This...
1
by: amitk | last post by:
Hello, I'm using Access 2002-2003. My application exports an Access table into a text file and then appends the text file with several othet files to generate a final file XXXX.ftm . ...
0
by: Cuaracao | last post by:
This is my code: Code1: 'DoCmd.OpenTable "tblImport" 'DoCmd.TransferDatabase acExport, "dBASE IV", strOutputDir,acTable,"sel_TblImport", strDbfName & ".dbf", False ' DoCmd.Close acTable,...
10
by: sakurako97 | last post by:
hi, i am trying to find out if it is possible to pass the current recordset of a form to DoCmd.TransferText so i can export it as a .csv I know I can use querydefs etc, but it would be a much...
14
jbt007
by: jbt007 | last post by:
Hi All, System: Access 2010, WinXP I have a text file I am importing using the following code: 'Import text report into tblBVRRaw table using the BVRImp Spec... DoCmd.TransferText...
2
by: Mariostg | last post by:
I am having issues importing a space delimited file with DoCmd.TransferText. I created a specification name through File->Get External Data->Import. It all works fine when I import the file via the...
3
by: ercanu | last post by:
hi everyone: i am trying to import an csv file from internet to my database. i use these vars: myurl= "www.heresmyfile/table.csv" mypath= "C:\users\me\table.csv 'i use the API function...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.