Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2007
    Posts
    6

    Unanswered: How to modify saved export specifications

    I have an application which exports several text files using saved specifications. The date in this text file skips last digit of date when date has 8 digits. So if date is 12/20/2008 it prints only 12/20/200. I tried to change the saved specs but its not helping. How do resolve this issue?

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Where is the date? Is it a field you are exporting or is it part of the filename?

    What do you mean by "prints only 12/20/200". Printing to a printer? and what are you printing? Have you tried adjusting the column width?

    Need a little more clarification to answer your question.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I'd be assuming it's in the exported text file that the date is not "printing", but assuming is dangerous

    I'd be checking the source data to ensure it's got the detail there, then checking the export spec for a conversion somewhere. Sounds like somewhere along the line, the date is being limited to 9 characters in some kind of text-date conversion.

    Personally, I never use saved specs, I always opt for VBA for this sort of thing; it gives me error trapping. With such error trapping you'd be able to see exactly what is going on.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Sep 2007
    Posts
    6

    I mean exporting when I said printing

    Sorry for the confusion.

    The source for the export is a query and it shows correct date format. But when used this query in the programs to export using the specification it truncates last digit of date when the date is more than 6 digits. I tried to change the specs and save them still its same.

    One thing which worked is when I changed the date format in the regional setting as m/d/yy format. However this will change the format of date globally for the entire system, hence I want to avoid it.

    Also, Microsoft helps suggests that the specs are saved in Schema.ini file, I searched the entire hard disk to find it but did not find any such file which will be used by Access. I am using Access 2003.

    Does anyone know how to resolve this issue?

    Thanks,

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so its a date value then....
    I doubt the problem lies with the export spec.. I suspect it lies with the import or formatting in the target system

    AFAIK you cannot edit a fiel specification.. all you can do is create a new file spec and overwrite the old one.

  6. #6
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    I believe you should be able to change the File Specification. When you export, is it to a delimited file? If so, then after pressing the Advanced button you should see one column that has all of the fields you are about to export. Microsoft has hidden several other columns that might be affecting the output. Put your cursor to the right of the Field Name and when the cursor changes to a plus sign with two arrows, double click and you should see a new column appear (probably Skip).

    If you keep double clicking you should see Data Type, Start, Width, and Indexed. My guess is that the Width for the given field is set to 9. I am not sure how this gets set but I believe this should fix your problem. Then save the Specification.

  7. #7
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    The other thing I know that might be helpful, the File Specs are stored in two tables. The MSysIMEXSpecs table stores the file spec header information (name, delimited or not, etc.) and the MSysIMEXColumns table sotres the detail information of the file spec. This applies to 2002. As with most things in Access it could be different for later versions. And I am sure 97 was different, but I don't remember how the info was stored.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •