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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

schema.ini help

Status
Not open for further replies.

mgould00

Programmer
Feb 18, 2003
22
0
0
US
hello...
i have a section ov VBA that exports a table to a comma delimited .txt using:

DoCmd.TransferText acExportDelim, , "finalTable", "c:\database.txt"

which works great, but it has "" around all the text fields. i found some code that will generate an "on the fly" schema.ini file which should tell the export to not use the "" around the quotes - which also seems to be working because it creates this:

[database.txt]
ColNameHeader = False
CharacterSet = ANSI
Format = CSVDelimited
TextDelimiter = none

in schema.ini in the same directory as database.txt

however the export seems to be ignoring the schema.ini. i have googled this for 2 days and cannot find anything on this...

PLEASE HELP!!!

thanks in advance
-mike
 
mgould00,
Change [tt]acExportDelim[/tt] to [tt]acExportFixed[/tt] so the database engine knows to use the Schema.ini file?

CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
thanks CMP,
i tried you solution, but that threw an error that i need a "specification name argument". i should mention that i am using access 2007 and the steps for creating a specification name that i have found obviously do not apply to '07. which is why i am trying to use the schema.ini...

thanks!
-mike
 
mgould00,
Give this a try, I know the KB article is for Access 2000 but what the heck.
Code:
DoCmd.TransferText acExportFixed, [b]"c:\Schema.ini"[/b], "finalTable", "c:\database.txt"

ACC2000: Error When You Try to Use Schema.ini to Import or Export with the TransferText Method

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top