I have discovered a couple of years ago, that import with
DoCMD.TransferText for CSV text file doesn’t work in Acc2000, while it
works perfectly in ACC97.
which has been discussed on this newsgroup forum, so this fact was
fixed.
Since I have to transfer files from VMS( SAS ) to WIN (Access), I still
keep using ACC97 as a simplest and reliable tool. However, final
products, such as distributable data entry system for multi central
stroke register, needs to be acc2000 version. So I need to keep running
2 versions of Access. I wonder, whether in 2 years time this problem in
acc2000 has got fixed. Any news?
Vlad 6 2986
If you are referring to the fact that Access 2000 cannot figure out how to
TransferTEXT if the file type is not registered with Windows, no the problem
has not been fixed. In fact, Microsoft broke Access 97 also, so that the
problem occurs there also after the service packs.
A workaround might be to rename the file (Name statement).
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Vladislav Moltchanov" <vl******************@ktl.fi> wrote in message
news:40***************@ktl.fi...
I have discovered a couple of years ago, that import with DoCMD.TransferText for CSV text file doesn't work in Acc2000, while it works perfectly in ACC97. which has been discussed on this newsgroup forum, so this fact was fixed. Since I have to transfer files from VMS( SAS ) to WIN (Access), I still keep using ACC97 as a simplest and reliable tool. However, final products, such as distributable data entry system for multi central stroke register, needs to be acc2000 version. So I need to keep running 2 versions of Access. I wonder, whether in 2 years time this problem in acc2000 has got fixed. Any news?
Vlad
Allen Browne wrote: If you are referring to the fact that Access 2000 cannot figure out how to TransferTEXT if the file type is not registered with Windows, no the problem has not been fixed. In fact, Microsoft broke Access 97 also, so that the problem occurs there also after the service packs.
A workaround might be to rename the file (Name statement).
The file is a standard ASCII text file (<name>.txt), comma delimited, with text
fields quoted. By the way, with ACCESS 2000 it is possible to import it using
menu, however, not with code.It seems Access 2000 can't do automatic detection
of type (text or number) just by fact , field is quoted (text) or not ( number).
Besides, comma in text (though quoted) generates an error.
The same file is imported normal with Acces97 .
I am unable to reproduce the problems you describe.
Just tried an export to text file with quotes as delimiters and commas
embedded inside quotes, and no problem in A2000 SP3. Commands were:
DoCmd.TransferText acExportDelim,,"qry4Export", "c:\test.txt", true
DoCmd.TransferText acImportDelim,,"aTestImport", "c:\test.txt", true
Certainly Access is not good at guessing the field type, but if you import
into a temp table you can then append the results to the real table.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Vladislav Moltchanov" <vl******************@ktl.fi> wrote in message
news:40***************@ktl.fi...
Allen Browne wrote:
If you are referring to the fact that Access 2000 cannot figure out how
to TransferTEXT if the file type is not registered with Windows, no the
problem has not been fixed. In fact, Microsoft broke Access 97 also, so that the problem occurs there also after the service packs.
A workaround might be to rename the file (Name statement).
The file is a standard ASCII text file (<name>.txt), comma delimited,
with text fields quoted. By the way, with ACCESS 2000 it is possible to import it
using menu, however, not with code.It seems Access 2000 can't do automatic
detection of type (text or number) just by fact , field is quoted (text) or not (
number). Besides, comma in text (though quoted) generates an error. The same file is imported normal with Acces97 .
Vladislav Moltchanov <vl******************@ktl.fi> wrote in
news:40***************@ktl.fi: The file is a standard ASCII text file (<name>.txt), comma delimited, with text fields quoted. By the way, with ACCESS 2000 it is possible to import it using menu, however, not with code.It seems Access 2000 can't do automatic detection of type (text or number) just by fact , field is quoted (text) or not ( number). Besides, comma in text (though quoted) generates an error. The same file is imported normal with Acces97 .
It often cannot do the automatic detection of the data types.
If it's going to be done often and the column layout is always the
same, then you can save an import spec and use that with your
TransferDatabase command.
To create an import spec, start the import manually, but go to the
ADVANCED dialog and lay out your fields appropriately, and then save
the spec. Then it can be used as the appropriate argument for the
TransferDatabase command.
--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
> It often cannot do the automatic detection of the data types.
If it's going to be done often and the column layout is always the same, then you can save an import spec and use that with your TransferDatabase command.
To create an import spec, start the import manually, but go to the ADVANCED dialog and lay out your fields appropriately, and then save the spec. Then it can be used as the appropriate argument for the TransferDatabase command.
-- David W. Fenton http://www.bway.net/~dfenton dfenton at bway dot net http://www.bway.net/~dfassoc
1. Yes, after all I start to use specification created with "advanced"
dialog box.
2. The imported files are being modified quite often, this is why this
way is not convinient.
3. The following text file (the first 3 line + some more ) is processed
correctly by Access97 and could be processed only with specification by
Access 2000:
"IR","IC","DBNAME","DBTYPE","DBLABEL","VALRULE","V ALTEXT","DEFAULT","FMT","INPMASK","DBLEN","ITEM"
, , "CODE_SUB", "Text", "CODE_SUB", " ", " ", " ", "$CHAR8.", " ", 8, 2
, , "SDD01", "Integer", "SDD01", " ", " ", " ", "2.", "##;0;#", 2, 5
more lines
1, , "NTF0601", "Byte", "NTF0601", "1 or 2 or 9", "1 or 2 or 9", " ",
"F1.", "0;0;#", 1, 22
2, , "NTF0602", "Byte", "NTF0602", "1 or 2 or 9", "1 or 2 or 9", " ",
"F1.", "0;0;#", 1, 22
4. In the case above the pattern ', ,' at the beginning seems to cause
the problem. At least, when doing specification with "advanced" Access
"thinks" these are text fields.
5. However, another file induces a fully correct specification (no
correction is needed to what Access suggests). Nevertheless, using
TransferText without import specification generates error.
I can send these 2 files to anyone who wants test them.
Vladislav Moltchanov <vl******************@ktl.fi> wrote in
news:40***************@ktl.fi: I can send these 2 files to anyone who wants test them.
Looks to me like you'll need to process them manually, with basic
file I/O commands.
Dmitri's TextExport class does the job of exporting via those
methods, but is there a corresponding pre-built class for importing?
I'm not sure there could be, but it's the kind of thing I can never
wrap my head around, because the file I/O commands are so unlike
standard VB syntax that I just don't quite get them.
--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dan |
last post by:
Could someone please help me with auto importing a series of data
files into an Access table. I tried to follow code given below in a
previous messagebut i'm getting error messages.
Here's my...
|
by: ms |
last post by:
In Access 2000, I am using...
'Import Raw text to stageBMIDLog table.
DoCmd.TransferText acImportFixed, "BMIDLog Link Specification",
"stageBMIDLog", file
....to import raw records into a...
|
by: Vladislav Moltchanov |
last post by:
I have discovered a couple of years ago, that import with
DoCMD.TransferText for CSV text file doesn’t work in Acc2000, while it
works perfectly in ACC97.
which has been discussed on this...
|
by: khutch |
last post by:
Not that up on MS Access. I understand that the TransferText command
can be used to import csv files into a database. Question: Does the
text file have to mirror the alignment of the table columns...
|
by: Typehigh |
last post by:
I am a pretty saavy user, but I am having a real problem with the
DoCmd.TransferText operation.
I manually used the File>Get External Data> Import routine to set up an
import specification. It...
|
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...
|
by: Henrootje |
last post by:
Hello Access-guru's, wizards and helpful people!
I am trying to import several textfiles into several tables.
Now I thought the following code up which works swell:
Dim Importspecification,...
|
by: WillMiller |
last post by:
Hi,
I'm currently attempting to write a small Access Database which carries out the following tasks :
1. Imports Submission files (of a text variety) to a table using TransferText
on a daily...
|
by: derfer |
last post by:
I am trying to import a .inf file into access (the file comes from the output of some 3rd party software). I have managed to convert the file by opeing it in notepad and re-saving then a seperate...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
| |