Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Export Text Files with date format YMD and no time to be exported


Message #1 by "Bob Glover" <Bob@r...> on Mon, 23 Sep 2002 17:02:29 +0200
Can someone let me know how the schema.ini file is used with Exporting Text
files from Access2000
I am using DoCmd.TransferText acExportDelim, "TblContacts Export
Specification", "tblContacts", "C:\CodeProgrammes\Exports\tblContacts.txt"

where I want to specify a date form as yyyy-mm-dd  2003-10-22 and to have no
time zeros exported.
At the moment although I am using my "TblContacts Export Specification"
specification it is still exporting the date as 2003-10-22 000000.
The "TblContacts Export Specification" contains no time delimiter.

My Schema.ini file which is located in the dame folder as the export file

[tblContacts.txt]
ColNameHeader=True
CharacterSet=OEM
Format=CSVDelimited
MaxScanRows=25
DateTimeFormat=yyyy-mm-dd
TextDelimiter="


Many Thanks
Bob Glover
07950 030642 (mobile)

Bob Glover
07950 030642 (mobile)


Message #2 by "Leo Scott" <leoscott@c...> on Mon, 23 Sep 2002 10:43:14 -0700
Looking at the help on transfertext it appears that you can use either an
export specification or a schema.ini file.  Since your line specifies the
export spec that is probably what is being used.  If you remove that the
schema.ini file will need to be in the same directory as the exported file
will go.  See here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000/htm
l/acactTransferText.asp

For information on the schema.ini file try here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/od
bcjetschema_ini_file.asp


Also, if you have access to the Developers Edition of Office look in the
MSDN Library for Office 2000 for:
Customizing the Schema.ini File
It has a nice example.

|-----Original Message-----
|From: Bob Glover [mailto:Bob@r...]
|Sent: Monday, September 23, 2002 8:02 AM
|To: Access
|Subject: [access] Export Text Files with date format YMD and no time to
|be exported
|
|
|Can someone let me know how the schema.ini file is used with Exporting Text
|files from Access2000
|I am using DoCmd.TransferText acExportDelim, "TblContacts Export
|Specification", "tblContacts", "C:\CodeProgrammes\Exports\tblContacts.txt"
|
|where I want to specify a date form as yyyy-mm-dd  2003-10-22 and
|to have no
|time zeros exported.
|At the moment although I am using my "TblContacts Export Specification"
|specification it is still exporting the date as 2003-10-22 000000.
|The "TblContacts Export Specification" contains no time delimiter.
|
|My Schema.ini file which is located in the dame folder as the export file
|
|[tblContacts.txt]
|ColNameHeader=True
|CharacterSet=OEM
|Format=CSVDelimited
|MaxScanRows=25
|DateTimeFormat=yyyy-mm-dd
|TextDelimiter="
|
|
|Many Thanks
|Bob Glover
|07950 030642 (mobile)
|
|Bob Glover
|07950 030642 (mobile)
|
|
|

Message #3 by "Robert Glover" <bob@r...> on Tue, 24 Sep 2002 13:41:04
Thanks for your tip. But it does not appear to work with DoCmd.Transfer 
Text........., whichever way I tried.
I had to use strSQL = "SELECT * INTO 
[Text;Database=C:\CodeProgrammes\Exports\].[tblContacts.txt] FROM 
[tblContacts]" and excute this SQL query

Cheers

> Looking at the help on transfertext it appears that you can use either an
export specification or a schema.ini file.  Since your line specifies the
export spec that is probably what is being used.  If you remove that the
schema.ini file will need to be in the same directory as the exported file
will go.  See here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/off2000/htm
l/acactTransferText.asp

For information on the schema.ini file try here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/odbc/htm/od
bcjetschema_ini_file.asp


Also, if you have access to the Developers Edition of Office look in the
MSDN Library for Office 2000 for:
Customizing the Schema.ini File
It has a nice example.

|-----Original Message-----
|From: Bob Glover [mailto:Bob@r...]
|Sent: Monday, September 23, 2002 8:02 AM
|To: Access
|Subject: [access] Export Text Files with date format YMD and no time to
|be exported
|
|
|Can someone let me know how the schema.ini file is used with Exporting 
Text
|files from Access2000
|I am using DoCmd.TransferText acExportDelim, "TblContacts Export
|Specification", "tblContacts", "C:\CodeProgrammes\Exports\tblContacts.txt"
|
|where I want to specify a date form as yyyy-mm-dd  2003-10-22 and
|to have no
|time zeros exported.
|At the moment although I am using my "TblContacts Export Specification"
|specification it is still exporting the date as 2003-10-22 000000.
|The "TblContacts Export Specification" contains no time delimiter.
|
|My Schema.ini file which is located in the dame folder as the export file
|
|[tblContacts.txt]
|ColNameHeader=True
|CharacterSet=OEM
|Format=CSVDelimited
|MaxScanRows=25
|DateTimeFormat=yyyy-mm-dd
|TextDelimiter="
|
|
|Many Thanks
|Bob Glover
|07950 030642 (mobile)
|
|Bob Glover
|07950 030642 (mobile)
|
|
|


  Return to Index