OutputTo truncating text file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Cathryn
    New Member
    • Oct 2006
    • 2

    OutputTo truncating text file

    When using the command:

    DoCmd.OutputTo acOutputFunctio n, "SQLfunctioncal l", acFormatTXT, "filename"

    The results are truncated as shown below:

    ---------------------
    | Data |
    ---------------------
    | PRCG,AreaAp8,27-A |
    ---------------------
    | PRQT,MALL003386 ,0 |

    Results are also not truncated when output to Excel or when the function is run directly in Query Analyzer.

    Front end: Microsoft Access Project 2003
    Back end: SQL Server

    Any help would be appreciated,
    Cathryn
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    Hi Cathryn,

    In fact it isn't obvious where is the truncation... A part of your text isn't exported to txt? Or simply the columns in the table aren't arranged as real table in txt format?

    Best regards!

    Comment

    • Cathryn
      New Member
      • Oct 2006
      • 2

      #3
      Hi PEB,

      The data needs to go into a comma delimited file, but different rows have a different structure, therefore the function creates the correct structure and exports a single column table in the correct order. This single column has been truncated. The full version of the first few rows is shown below.

      PRCG,AreaAp8,27-Aug-06,156126.99,M2 53, ,20060827, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
      PRQT,MALL003386 ,001,7,27-Aug-06,0,M253, ,MEFT,INVC, ,20060827,M1,AU D,0,0,0,2008.90 ,27-Aug-06,0, ,N, ,N,AreaAp8,2006 0827, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
      PRLN,MALL003386 ,001,7,27-Aug-06,0,1, ,1826.27, , , , , , , , , , , , , , , , , , , , ,GST,G11,Full, , , ,M253,481200,90 0,800,20, , , , , , , , , , , , , , , , , , , , , , , , , , ,
      PRTX,MALL003386 ,001,7,27-Aug-06,0,GST,182.63 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
      PRQT,MAND003387 ,001,EMU8,27-Aug-06,0,M253, ,MEFT,INVC, ,20060827,M1,AU D,0,0,0,3653.57 ,27-Aug-06,0, ,N, ,N,AreaAp8,2006 0827, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
      PRLN,MAND003387 ,001,EMU8,27-Aug-06,0,1, ,3321.43, , , , , , , , , , , , , , , , , , , , ,GST,G11,Full, , , ,M253,481200,90 0,800,20, , , , , , , , , , , , , , , , , , , , , , , , , , ,
      PRTX,MAND003387 ,001,EMU8,27-Aug-06,0,GST,332.14 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

      Many thanks,
      Cathryn



      Originally posted by PEB
      Hi Cathryn,

      In fact it isn't obvious where is the truncation... A part of your text isn't exported to txt? Or simply the columns in the table aren't arranged as real table in txt format?

      Best regards!

      Comment

      • PEB
        Recognized Expert Top Contributor
        • Aug 2006
        • 1418

        #4
        So if I understand well, you put in one column all the information from a table, and your separator is the coma...

        But the export in txt fails with commas!

        And exports only the first 10-20 symbols... Strange seems like a limitation of variable or text that is limited to a certain length!

        Why do not try to do the export programticcally in this case it should work as you want!

        Best regards!

        Comment

        Working...