August 12, 2003 at 3:26 pm
Hello all
I am trying to run the following SQL statement:
EXEC master.dbo.xp_sendmail
@recipients = 'Joey.Sepidoza@ecolab.com',
@separator = ',',
@attachments = 'PestErrors.csv' ,
@message ='test' ,
@Query = 'SELECT No, Invoice, AccountNo, AccountName,
Program, SiteCode, SiteName, ConditionCode, ActionCode,
ConditionCategoryCode, ConditionCategoryDescription,
ConditionActionDescription, ConditionActionExpanded,
ServiceDate, ReferenceCode, StoreNumber, AcctNbr
FROM dbo.Audit
WHERE ErrorMsg LIKE ''Very Bad %'' AND EmailSent = ''N''',
@width = 1000,
@attach_results = 'True',
@copy_recipients = 'My.Name@MyWork.com' ,
@subject = 'Errors found'
I get the following MOST helpful message
xp_sendmail: failed with operating system error 5
Anyone seen this before? Any idea on how to fix it?
August 13, 2003 at 10:49 am
August 14, 2003 at 6:49 am
Great article - Unfortunately it the fix is for Personal Edition on Windows 98 or ME.
We are running Standard Edition (sp3) on a 2000 server.
It is a maddening error - the same query runs fine on a 7.0 box.
August 14, 2003 at 7:11 am
Two things: use the three part naming scheme database.owner.table in your FROM clause; specify the complete path to your attachment PestErrors.csv
Hope this helps.
Joseph
Joseph
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply