473,396 Members | 1,804 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,396 software developers and data experts.

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

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
6 2867
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
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
"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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Alex NSB | last post by:
Hi all. I have to import a CSV file (made by the user with Excel) into an A97 table. This is the code I use in my ASP page (NT4.0 Server/IIS4): sql = "INSERT INTO ImportTable SELECT * FROM...
22
by: Bradley | last post by:
Has anyone else noticed this problem? I converted the back-end to A2000 and the performance problem was fixed. We supply a 97 and 2000 version of our software so we kept the backend in A97 to make...
3
by: Pieter Linden | last post by:
I have a database of rental units etc that I'm using the CreateTableFromRecordset code from ADH 2000. Well, at the moment, I'm doing a sanity check and testing it on my computer, with A2002, but...
5
by: MLH | last post by:
A97 aborts creation of MDE reporting that there's a compile error in one form. Sure enough, if I remove the form from the source database and attempt to compile the MDE, it succeeds. But when I...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
8
by: Arno R | last post by:
Hi all, All of a sudden I have problems importing and exporting textfiles with A97. Code was working allright for years and years, but not today... Since I have this app in two versions I...
2
by: CDMAPoster | last post by:
I'm putting out some more experimental software. When creating PDF files from A97 I often have a static layout consisting of PDF commands along with PDF commands that are dependent on the data...
2
by: KingoftheKings | last post by:
I'm new here. I want a help with VB codes that will import text or excel files from a specified directory in to an existing or new Access table. I have written some codes, but when I click the...
6
by: provor | last post by:
Hello, I have the following code that I am using when a user presses a button to import an excel file into a table. The code is hard coded to point to the correct table. This works great for this...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.