By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,319 Members | 1,963 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,319 IT Pros & Developers. It's quick & easy.

A97: Can't import a text file to an Access 97 table?

P: n/a
MLH
I was able to do this from Access 2.0. It had to be set up, of course,
but it could be done. I'm unsure as to why Access 97 says "Can't find
file"???

C:\DOCUME~1\Owner\LOCALS~1\Temp\WER2E70.tmp.dir00\ appcompat.txt

Notepad certainly has no problem finding and opening the file. Are any
of you familiar with this?
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
MLH
I should have also mentioned that CMD (a poor substitute for DOS)
ALSO seems to have a problem finding the file...

C:\DB>copy
C:\DOCUME~1\Owner\LOCALS~1\Temp\WER2E70.tmp.dir00\ appcompat.t
xt MyText.txt /v
The system cannot find the file specified.

Obviously, what I've done from NotePad is use SAVE AS to save file
to c:\tempdir\myfile.txt. I have no trouble reading it there. What
possible reason would MicroSoft have for hiding text files from MS
Access and CMD?
Nov 13 '05 #2

P: n/a
jr
Try enclosing the filepath in quotes when importing if you are using code
"C:\DOCUME~1\Owner\LOCALS~1\Temp\WER2E70.tmp.dir00 \appcompat.txt"
otherwise try changing to a more appropriate and less fussy filepath such as
C:\DOCUMEnts\Owner\LOCALS1\Download\appcompat.txt

temp directories are always going to be a bit suspect for data sourcing - XP
/ NT office 97 /2000/2002/xp ???leghorn who knows dll updates registrys
,etc ect
"MLH" <CR**@NorthState.net> wrote in message
news:dr********************************@4ax.com...
I was able to do this from Access 2.0. It had to be set up, of course,
but it could be done. I'm unsure as to why Access 97 says "Can't find
file"???

C:\DOCUME~1\Owner\LOCALS~1\Temp\WER2E70.tmp.dir00\ appcompat.txt

Notepad certainly has no problem finding and opening the file. Are any
of you familiar with this?

Nov 13 '05 #3

P: n/a
"jr" <jr************@virgin.net> wrote in
news:9v*****************@newsfe2-win.ntli.net:
Try enclosing the filepath in quotes when importing if you are
using code
"C:\DOCUME~1\Owner\LOCALS~1\Temp\WER2E70.tmp.dir00 \appcompat.txt"

otherwise try changing to a more appropriate and less fussy
filepath such as
C:\DOCUMEnts\Owner\LOCALS1\Download\appcompat.txt

temp directories are always going to be a bit suspect for data
sourcing - XP / NT office 97 /2000/2002/xp ???leghorn who knows
dll updates registrys ,etc ect


Surely if MLH is programming correctly, he's using the OS's temp
directory, as defined in the %TEMP% environment variable. THIS IS A
GOOD THING.

The way around the problem is to enclose the whole thing in quotes,
as you say, and then it doesn't matter where the location is, how
many spaces are in the path or how long the file names are.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #4

P: n/a
MLH <CR**@NorthState.net> wrote in
news:54********************************@4ax.com:
I should have also mentioned that CMD (a poor substitute for DOS)
No, it's actually VASTLY SUPERIOR to DOS. You are blaming the NT
command prompt processor for your own ignorance of how to deal with
long filenames at the command prompt.
ALSO seems to have a problem finding the file...

C:\DB>copy
C:\DOCUME~1\Owner\LOCALS~1\Temp\WER2E70.tmp.dir00\ appcompat.t
xt MyText.txt /v
The system cannot find the file specified.
Yes, because it's a long filename. Note that "WER2E70.tmp.dir00"
would not have been a valid filename before Win95, when 8.3 was
required.
Obviously, what I've done from NotePad is use SAVE AS to save file
to c:\tempdir\myfile.txt. I have no trouble reading it there. What
possible reason would MicroSoft have for hiding text files from MS
Access and CMD?


They aren't. You just aren't using the right methods for referring
to the file. If it was a fully 8.3-compatible filename and path (no
spaces, no double extensions), then you'd not be required to use the
quotes.

But since you don't know what name a user might be giving, you have
to use the quotation marks.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #5

P: n/a
MLH
David, I appreciate the input. Thx much. But I disagree
wholeheartedly.

Can you explain to me why clicking Start, Run and typing

C:\DOCUME~1\Owner\LOCALS~1\Temp\WER2E70.tmp.dir00\ appcompat.txt

then pressing Enter invokes NotePad and finds the file perfectly well.
That's certainly not the syntax you were talking about and you'll find
no quotation marks in there. According to your comments, that can't
be done. Can you explain why pointing MS Access to it while attempting
to import the txt file fails? I don't think so.

If you are correct, and I am ignorant of NT's CMD syntax, how about
explaining why I can launch CMD, type

cd\docume~1\owner\locals~1\temp

press Enter and reach the desired directory w/ no problem? So much
for the LFN syntax, huh? The fact is, David, the above syntax works
perfectly well in the CMD window. And I'm afraid you're wrong about
MS not hiding the file. Fact is, they have. They did so by hiding the
directory in which the file is located.

You should actually try what I outlined in my original post. Go ahead
and try it first. Ask me, and I'll tell you how to force MS Access to
create the text file. That way, you can replicate the text file for
yourself. Then repost your comments. I'd love to hear what you have to
say afterwards.
Nov 13 '05 #6

P: n/a
MLH <CR**@NorthState.net> wrote in
news:n0********************************@4ax.com:
David, I appreciate the input. Thx much. But I disagree
wholeheartedly.

Can you explain to me why clicking Start, Run and typing

C:\DOCUME~1\Owner\LOCALS~1\Temp\WER2E70.tmp.dir00\ appcompat.txt

then pressing Enter invokes NotePad and finds the file perfectly
well. That's certainly not the syntax you were talking about and
you'll find no quotation marks in there. According to your
comments, that can't be done. . . .
No, I said NO SUCH THING.
. . . Can you explain why pointing MS
Access to it while attempting to import the txt file fails? I
don't think so.
Fails how and where?
If you are correct, and I am ignorant of NT's CMD syntax, how
about explaining why I can launch CMD, type

cd\docume~1\owner\locals~1\temp
Because it uses SHORT FILENAMES, not long ones.
press Enter and reach the desired directory w/ no problem? So much
for the LFN syntax, huh? . . .
Well, it was always an elegant kludge. If you'd bothered to learn
how it worked when it was introduced in Win95, perhaps you wouldn't
be puzzling over it TEN YEARS LATER.
. . . The fact is, David, the above syntax
works perfectly well in the CMD window. And I'm afraid you're
wrong about MS not hiding the file. Fact is, they have. They did
so by hiding the directory in which the file is located.
From what? And from whom? If you open up Windows Explorer, is it
hidden when you view the temp directory?

If not, then the issue is with the filter for the dialog you're
using to open the file with.

Actually, the problem has nothing to do with any of these. Your temp
folder is in the Local Settings subfolder of your user profile, and
that is by default A HIDDEN FOLDER. If you don't have Windows
Explorer set up to display hidden files, you won't see files there.

I don't even see a problem with that setting -- Access still shows
the hidden files. Maybe you've got the wrong file filter.
You should actually try what I outlined in my original post. Go
ahead and try it first. Ask me, and I'll tell you how to force MS
Access to create the text file. That way, you can replicate the
text file for yourself. Then repost your comments. I'd love to
hear what you have to say afterwards.


I think you are really beginning to annoy the hell out of me with
your 200 questions a day, most of which are duplicates of the same
problem.

Learn the basics.

Spend time with the documentation.

To me, you look like someone who has about 10 years of work to catch
up on. Come back when you've done that and I might be able to help
out.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.