?
Solved

Xp_Sendmail not mailing Ascii

Posted on 2011-09-14
4
Medium Priority
?
582 Views
Last Modified: 2012-07-21
I have a process that does a simple select. Once it does this select, it executes the XP_Sendmail to a .csv, but the problem is the .csv file needs to be in ascii format, its defaulting to uuincode

Any Help?

0
Comment
Question by:sysadmn_ascent
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 17

Expert Comment

by:dbaSQL
ID: 36542369
have you tried to use sp_send_dbmail?  it may not be a problem with xp_sendmail.  how are you creating the file?
http://dbaspot.com/sqlserver-server/369348-why-does-xp_sendmail-always-creates-using-unicode.html
0
 
LVL 21

Accepted Solution

by:
Alpesh Patel earned 2000 total points
ID: 36542596
yes use the Database Mail. First configure it and use it
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 36546776
If you are running the query via the email then it makes little difference. The result will be unicode. At one point it used to generate Ansi / Ascii output but with the various upgrades it lost that ability and became unicode by default.

It has been some time since I last looked into it, and would have hoped there was an option by now. But cursory checks suggest it is still unicode output. I can check further if needed.

Possibly the best way is to generate the output and attach the results rather than attach the query. This is also true for dbmail.

Also, if using SQL 2005 and later, then most definitely look at the newer tools with dbmail - even though attached queries will still generate unicode, it is a far better tool (in my opinion).

But, execute the query first, generate the attachment, then attach that (and not the query).

If you can give us an example of what you are currently doing (and versions), we might be able to suggest the more appropriate solution.
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 38211609
Strange... Would have though dbasql might have earned some points given the accepted solution.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question