Exporting a custom delimited file from an .adp

T

TL

file I am having a problem exporting a table from SQL to a text using a
custom delimiter. When using a default of csv everything works fine. Below
please see some of the code I am using and below that is the schema file. I
am a little confused because I never want the file name to be the same so I
am not sure what to put in the first line.

Extension = ".txt"
'Identity = Format(Now(), "ddmmyyyy")
Identity = Format(Now(), "mmddyyyyhhnnss")
Identity1 = Identity & Extension
Location = "C:\Program Files\Files\Prr110_results_" & Identity1


DoCmd.Hourglass (False)



DoCmd.TransferText acExportDelim, "Schema.ini", _
"dbo." & Tablename, Location, True


Schema

ColNameHeader=True
CharacterSet=1252
Format=Delimited(~)
Col1=name Char Width 50
Col2="name 2" Char Width 50
Col3="name 3" Char Width 50
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top