473,626 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\Own er\LOCALS~1\Tem p\WER2E70.tmp.d ir00\appcompat. txt

Notepad certainly has no problem finding and opening the file. Are any
of you familiar with this?
Nov 13 '05 #1
6 2882
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\Own er\LOCALS~1\Tem p\WER2E70.tmp.d ir00\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\myfi le.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\Ow ner\LOCALS~1\Te mp\WER2E70.tmp. dir00\appcompat .txt"
otherwise try changing to a more appropriate and less fussy filepath such as
C:\DOCUMEnts\Ow ner\LOCALS1\Dow nload\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**@NorthStat e.net> wrote in message
news:dr******** *************** *********@4ax.c om...
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\Own er\LOCALS~1\Tem p\WER2E70.tmp.d ir00\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******** *********@newsf e2-win.ntli.net:
Try enclosing the filepath in quotes when importing if you are
using code
"C:\DOCUME~1\Ow ner\LOCALS~1\Te mp\WER2E70.tmp. dir00\appcompat .txt"

otherwise try changing to a more appropriate and less fussy
filepath such as
C:\DOCUMEnts\Ow ner\LOCALS1\Dow nload\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**@NorthStat e.net> wrote in
news:54******** *************** *********@4ax.c om:
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\Own er\LOCALS~1\Tem p\WER2E70.tmp.d ir00\appcompat. t
xt MyText.txt /v
The system cannot find the file specified.
Yes, because it's a long filename. Note that "WER2E70.tmp.di r00"
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\myfi le.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\Own er\LOCALS~1\Tem p\WER2E70.tmp.d ir00\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\own er\locals~1\tem p

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**@NorthStat e.net> wrote in
news:n0******** *************** *********@4ax.c om:
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\Own er\LOCALS~1\Tem p\WER2E70.tmp.d ir00\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\own er\locals~1\tem p
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
318
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 ." It works, but I have a little problem that is driving me crazy: one of the fields is a phone number and I'm unable to preserve the leading zero.
22
2327
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 upgrading simple for users. We've done it like that for years but a new client has been having severe performance issues... solved by converting the backend to 2000. -- regards, Bradley
3
2160
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 anyway.... I'm trying to create is building by building (a table for each pair of buildings), so the format is something like this: Building AptNo AptType Tenant Annual Income Rent
5
2110
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 open the source MDB file and the form's class module, click Debug, Compile Loaded Modules - no compile time error is reported. What is the MDE doing to find a compile time error that Debug/Compile Loaded Modules is not? If you've encountered...
6
4864
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 the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
8
7847
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 tested the behaviour in A2k also. To my surprise the *same* code with the *same* files works with A2k and *not* with A97 FYI: App is split FE-BE and the BE is in Access97 format, so the same BE is used with these versions. So I have FE97-BE97 and...
2
1580
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 that are added dynamically. I created PDFLayoutViewer.mdb for the purpose of editing the invariant portions of the output. It is important that the PDF commands be placed in the proper order so I have to have a way to do that. The problem that...
2
12082
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 command button, nothing happens.Here is my code: Private Sub cmdStartImport_Click() Dim rst As ADODB.Recordset Dim strNewTable As String Dim strFileType As String On Error GoTo ErrorHandler
6
26298
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 one table. My problem is I have two buttons I want to use this code for for the two buttons would put the data in different tables. I have tried copying and changing a few things and nothing will work for me. The code is set up in a module and then I...
0
8192
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8696
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7188
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6119
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4195
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1504
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.