May 10, 2006 at 10:15 pm
Hi there,
I have a problem on sending csv attachment file by using sp_send_dbmail.
When open it up, i alwys got a error message on not reconize formatting.
In the sql server 2000, we used xp_sendmail and using @ansi_attachment=true which working well.
Is there anyone know how to convert attachment file from unicode to ansi format?
Kindly help..
May 12, 2006 at 4:34 am
Hi,
I have a similar problem myself when it comes to generating a .csv attachment using;
@query='<SQL Query>',
@query_attachment_filename = '<filename>'
feature of sp_send_dbmail
Everytime when I go to open up the file attachment in Excel, It throws the same error message, however it's more of an annoyance than a problem, because it still let's me open the file, and the results display as expected.
-Chuck
May 12, 2006 at 12:36 pm
I have already brought this to MS's attention. I was told it was an oversight and will be fixed in SP2.
November 10, 2006 at 6:58 am
Have you had any feedback further on this? I've run into this, trying to use sp_send_dbmail for the first time. SP2 went CTP on 6 November - I wonder how long before it goes out?
If anyone has a solution for this, please let me know, otherwise we will have to write an SSIS package for each on of these derned things
November 10, 2006 at 7:12 am
FIX: Error message when you try to open a file attachment in a message that is generated by the sp_send_dbmail procedure in SQL Server 2005: "This file is not in a recognizable format"
http://support.microsoft.com/default.aspx?scid=kb;EN-US;924345
November 10, 2006 at 7:29 am
Thanks for the response! Pity the underlying KB isn't in place - I get '
if I try to click through
April 25, 2007 at 6:10 am
this has been resolved in SP2, fyi. My alerts no longer have this issue
July 5, 2007 at 9:42 am
I have installed SP2 and it still creates attachments in UNICODE format.
Is there a new sp_send_dbmail option in SP2 we need to use in order to have it create ANSI attachments?
July 9, 2007 at 3:05 am
Unfortunately, afaik, no, there is no 'ANSI attachment' option. Wish there was. My issue was fixed simply from the point of view that SP2 corrected the errors in the format of the csv file, which allowed excel to open the file without complaining.
July 9, 2007 at 3:45 am
Wanderer is correct. There is no new parameter with sp_send_dbmail, its in-built now.
921896 A list of the bugs that are fixed in SQL Server 2005 Service Pack 2
http://support.microsoft.com/default.aspx?scid=kb;EN-US;921896
Above refered to KB 924345, which is not getting opened. (should be fixed soon)
It mentions that issue is fixed in SP2.
November 13, 2008 at 9:34 am
Graben la salida del select como un archivo a disco, alli se grabara como ANSI, luego hacen que el proceso tome este archivo y lo envie como un attach.
November 13, 2008 at 1:48 pm
:unsure: ??
March 11, 2009 at 5:54 am
Hi guys!
Maybe i missed somethig...
Is there any way to generate the txt file in ANSI encoding or not?
Thanks
Andrew
August 13, 2009 at 8:29 am
After you apply the SP2, the sp_send_dbmail procedure only generates files in a recognizable Unicode format, not an ANSI format.
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply