Results 1 to 5 of 5
  1. #1
    Join Date
    May 2005
    Location
    Leicester - UK
    Posts
    44

    Unanswered: DTS Advice - Appending to a Text File

    Hi all,

    I am having a problem with a DTS package I am writing. The package is getting text from a table and putting it out to a text file. I have most of it sorted, and contains text like this:
    PN,GEN,T_KI-3,2006-01-24 00:30,480,2006-01-24 01:00,480
    PN,GEN,T_KI-2,2006-01-24 00:40,484,2006-01-24 02:00,482
    PN,GEN,T_KI-3,2006-01-24 00:50,490,2006-01-24 05:00,486

    What I need is a line at the end of the text which is:
    <EOF>

    So the output from this will look like:
    PN,GEN,T_KI-3,2006-01-24 00:30,480,2006-01-24 01:00,480
    PN,GEN,T_KI-2,2006-01-24 00:40,484,2006-01-24 02:00,482
    PN,GEN,T_KI-3,2006-01-24 00:50,490,2006-01-24 05:00,486
    <EOF>


    I am having problems adding the line at the end of the text file. Can anyone advice me of a good solution or show me where I amn going wrong?

    TAI,
    Gee
    "Happiness is a good health and a bad memory"

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    I'm confused...you want the valeu "<EOF>" in the table?

    Is it in the file.

    Oh, and read my sig
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    May 2005
    Location
    Leicester - UK
    Posts
    44
    Sorry, I am sending the result of a query to a text file, and i want to end the text file with a final line that has <EOF> on it.
    "Happiness is a good health and a bad memory"

  4. #4
    Join Date
    May 2005
    Location
    Leicester - UK
    Posts
    44
    Does anyone have an idea how I can add the text <EOF> to the bottom of a text file? I am sure this is simple but I just can't figure it out and it is making me go nuts!
    "Happiness is a good health and a bad memory"

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    There are a number of ways to get there from here. I'd suggest that you re-read Brett's response and follow his suggestion if you want more detailed help.

    If this is a "one off" kind of solution, you might consider using an Active-X script at the end of the DTS package that outputs the string for you. It is easy to add, and means no convoluted logic, just a "tag along" bit of trailer code.

    -PatP

Posting Permissions

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