Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DoCmd.TransferText with error 3625

Status
Not open for further replies.

h00ch

Programmer
Joined
Feb 26, 2004
Messages
4
Location
BY
hi all
i try to accomplish with
DoCmd.TransferText acImportDelim, "Schema.ini", "TestTable", "1.txt"
that unfortunally comes with the 3625 error: "the text file specification "Schema.ini" does not exists". i've tried to put the whole path like "D:\\BlaBlaBla\\Schema.ini" but without effect :(

when i wipe out schema param, all goes fine:
DoCmd.TransferText acImportDelim, , "TestTable", "1.txt"
but i retrieve all the 1.txt data in one column named F1 instead of separate columns.

here go my files
1.txt (tab delimited):
read the f manual
search the f web
do the right things

and Schema.ini:
ColNameHeader=False
Format=TabDelimited
MaxScanRows=0
CharacterSet=OEM
Col1="first" Char Width 10
Col2="second" Char Width 10
Col3="third" Date Width 10
Col4="fourth" Date Width 10

both are allocated in the same directory.
any suggestions?
 
What version of Access is this?
In 97, the help for specification has this to say:

specificationname
A string expression that's the name of an import or export specification you've created and saved in the current database.

Nothing there about an external file.

Run through importing the text file manually using the
GetExternal Data / Import menu item.

Work through the wizard, specifying tab delimiters etc.
At the last page of the wizard, click on Advanced button.
This will show a graphic layout of your import spec.
Click SAVE
and save the spec as MYIMPORTSPEC or whatever.

Then, your VBA code should read:

DoCmd.TransferText acImportDelim, "MYIMPORTSPEC", "TestTable", "1.txt"
 
THANX A LOT!
I've read about saving spec in a current database but did not figure out how to do it ;) ... that's why I had chosen the way of creating my own standalone schema.

Now it works almost fine: the table creates but spacing does not fulfil. I designe tab separated flat file but the column data of Access table I'm creating does not correspond. It looks like Access does not discern tab separations but identifies some else character as delimiter instead.

While using saved schema in File->GetExternalData->Import... all works fine.

If I find the reason I'll write it below.
 
Well, I'm a dunce :(
DoCmd.TransferText acImportDelim, "TestImportSpec", "TestTable", "1.txt"

.... BTW, could anybody (perhaps, with native english) explain me the difference between the words

dolt
blockhead
dunce
goon
nerd

and their "lexical strength" :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top