Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2002
    Posts
    94

    Unanswered: xp_sendmail with csv as attachment

    Hi,

    I am on SQL Server 2000 with

    Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19 2001 13:23:50 Copyright (c) 1988-2000 Microsoft Corporation Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 3)

    I am using xp_sendmail using query and generate .csv file .

    when I open that attachment using I get error of unrecognizable format.

    I checked KBA : 280720

    I have sqlmap70.dll of 169 kb dated 11/19/2001 which is later then KBA 280720.

    Why I am still having problem?

    Please let me know.

    Thanks ,
    Ram.

  2. #2
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    what does you SQL command look like, could you post?
    Paul Young
    (Knowledge is power! Get some!)

  3. #3
    Join Date
    Nov 2002
    Posts
    94
    Originally posted by Paul Young
    what does you SQL command look like, could you post?
    execute master..xp_sendmail
    @recipients = 'rams@abc-inc.com',
    @message = 'Terr Result',
    @query = 'select * from prod1..terr_master',
    @width = 256,
    @subject = 'query result',
    @attach_results = 'true',
    @no_header = 'false',
    @separator = ',',
    @attachments = 'terr_master.csv'

    I tried @ansi_attachment 'true' , process hangs. Please let me know Paul

    Thanks

  4. #4
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    Okay, I was able to duplicate your problem.

    I have SQL ver 8.00818, Sqlmap70.dll 23-Apr-2003

    when I ran:
    Code:
    execute	master..xp_sendmail
    	@recipients = 'user1',
        	@message = 'Testing',
        	@query = 'select * from sysobjects',
        	@width = 256,
        	@subject = 'testing',
        	@attach_results = 'true',
        	@no_header = 'false',
        	@separator = ',',
        	@attachments = 'test.csv'
    I received a unicode csv file.

    I than applied the registry fix in the kb article http://support.microsoft.com/default...b;en-us;280720 as my registry was missing the entries. I am wondering if you applied the fix since your process is hanging.

    reran the above and all is well.
    Last edited by Paul Young; 08-22-03 at 12:51.
    Paul Young
    (Knowledge is power! Get some!)

  5. #5
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    Opps! forgot to mention I needed to change the @width to 1000 to prevent a lf showing up in the middle of the row.

    Code:
    execute	master..xp_sendmail
    	@recipients = xxxxxxx,
        	@message = 'Testing',
        	@query = 'select * from sysobjects',
        	@width = 1000,
        	@subject = 'testing',
        	@attach_results = 'true',
        	@no_header = 'false',
        	@separator = ',',
        	@attachments = 'test.csv'
    Paul Young
    (Knowledge is power! Get some!)

Posting Permissions

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