Need help with a Export

  • Hi Debra,

    The technique that I have seen is to write the trailer data to a separate file and concatenate the files at the DOS level. You could also use the FileSystemObject in an ActiveXScript Task to combine the view file and the trailer file.

    Norman Kelm

    DTS Package Search

    http://www.dtspackagesearch.com/

  • Hi Norman,

    I do not have the knowledge to write a ActiveXScript Task.

    Any help would be greatly appreciated!;)

  • Great examples here: http://www.sqldts.com/292.aspx

    Here is code that opens a file for append

    strFile = "c:\output.txt" ' e.g. c:\output.txt

    ' ------ END CONFIGURATION ---------

    const ForAppending = 8

    set objFSO = CreateObject("Scripting.FileSystemObject")

    set objFile = objFSO.OpenTextFile(strFile, ForAppending, True)

    objFile.WriteLine("Script completed: " & Now)

    objFile.Close

    Norman Kelm

    DTS Package Search

    http://www.dtspackagesearch.com/

  • Thanks, Norman

    objFile.WriteLine("How do I reference the trailer row here?")

    strFile = "c:\output.txt" ' e.g. c:\output.txt

    ' ------ END CONFIGURATION ---------

    const ForAppending = 8

    set objFSO = CreateObject("Scripting.FileSystemObject")

    set objFile = objFSO.OpenTextFile(strFile, ForAppending, True)

    objFile.WriteLine("Script completed: " & Now)

    objFile.Close

Viewing 4 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply