Hi,
I investigated using the same code in an Access Project without success ...
Nor could I export a view/query to a file using the TransferText action ...
there isn't even an 'advanced' button to save a specification in the export
wizard ...
What is frustrating is that all the microsoft help files and MSDN etc all
say that this can be done ... so either it can and I'm an idiot or there is a
major fault in this particular method ....
I will continue to investigate and let you know if I eventually have succes
... just hope I don't go crazy in the mean time ...
I used the followinq within an Access mdb with success ...
DoCmd.TransferText acImportDelim, "XREF2CSV", "XREF2", sCSV_File, False
sCSV_File was a sting containg the full path to the file and the File name
was XREF2.csv and The Table I Imported to was XREF2.
XREF2CSV was the schema file I created (note: no file extension)
(I created it using notepad and then removed the .txt extension)
and saved it in the same directory as XREF2.csv ... it looked like this
[XREF2.csv]
Format=CSVDelimited
ColNameHeader=False
Col1=STOCK_CODE Text Width 255
Col2=OEM_NUMBERS Text Width 255
CharacterSet=ANSI
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetschema_ini_file.asp
provides the information on the data types etc that can be used ...
Cheers,
Trebor
Hi Trebor,
I'm having the same kind of problem with transfertext Command. Can you
please elaborate your solution.
1. I want to know if you can use DoCmd.TransferText to transfer the
data created by view in SQL Server and .adp Access application into a
text file.
2. How do you create the specification file and what all parameters can
you specify in that specification file. and how to save that file.
Please if you can help me in the above questions I would really
appreciate it.
Thanks