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

Export fixed width file with schema.ini

Status
Not open for further replies.

jacquid

MIS
Nov 7, 2000
27
US
I have been using a macro with the Transfer text action to export data. I had a problem with my machine and it got formatted. Now when I attempt to run the macro I get the following error :"The data being formated does not match the described in the schema.ini file."

As far as I know I did not create an schema.ini. I thought I was using a specification name argument which was created by the export text wizard where I saved a specification.

I have tried to redo the specification but I get the same error.

How do I create a schema.ini file?
There are two fields on the export qry Expr1(23 char) & Expr2(232 char).


 
Looking at the (Access 2000) help re TransferText Specification Name...

The specification name for the set of options that determines how a text file is imported, exported, or linked. For a fixed-width text file, you must either specify an argument or use a schema.ini file, which must be stored in the same folder as the imported, linked, or exported text file.

...I must admit I wasn't aware of the possibility of an INI file being used (I thought they went out with Access 2).

I suppose it's worth a look to make sure you havent got such a file knocking about and then if I were you I'd try doing a manual export of your data to see what happens (I hate using macros at the best of times - no debugging / error trapping).

Shep



 
Shep,

I am aware of the description in Access 2000) help re TransferText Specification Name but it states "you must either specify an argument or use a schema.ini file" - which does not help if you do not know how to create a schema.ini. The agrument I managed to create using the export wizard.

I have search my "new" machine (not it has been formated) for the ini file.

I have redone the manual export to create a new argument but this does not help.

What I need to do now is create a schema.ini file and I do not know how to do this.

Help!
 
jacquid,
The way the help file read, I took it to mean that Access would only use an INI file if no specification name was included. Presumably you have included a specification for the export to use and it does exist in your database ?
As an extra test could you try doing what the macro is trying to do via code...

Sub myexport()
DoCmd.TransferText acExportDelim,
"My_Export_Spec", "tblToBeExported", "C:\FileName.txt"
end sub

Shep
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top