Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server 2005 - Mail Invalid parameter @ansi_attachment

Status
Not open for further replies.

Dons1000

Programmer
Jul 18, 2006
17
US
Hello, I'm using xp_sendmail in SQL 2005 and received this error "xp_sendmail: Invalid parameter '@ansi_attachment'" ; is this @ansi_attachment no longer supported in 2005

Sample Below
Select @SQLQuery = 'Declare @rc int
EXEC @rc = master.dbo.xp_sendmail
@recipients = N'''+@vTo+'''
,@message = N'''+@vMessage+'''
,@query = N'''+@vSQL+'''
,@attachments =''Prices Expiring.txt''
,@ansi_attachment=''TRUE''
,@copy_recipients = N'''+@vCC+'''
,@subject = N'''+@vSubject+'''
,@attach_results = ''TRUE''
,@width = 500
 
There is an @attachments variable, not an @ansi_attachments variable.

xp_sendmail is going to go away in the next versions of SQL Server. You may want to look at sp_send_dbmail.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top