Groups | Blog | Home
all groups > sql server programming > september 2003 >

sql server programming : Problems with xp_sendmail



aerick
9/21/2003 9:58:22 PM
hi,

I'm having a problem with xp_sendmail.
I've tried the following from query analyser with sa as
the user:

exec master..xp_sendmail @recipients='aezza@msn.com',
@subject='test',@message='test message', @query='select
top 1 * from TestDB..TestTable'

with the following result:
ODBC error 4604 (42000) There is no such user or
group 'sa0'.

However, if i execute the exact query without the @query
argument i get an email.

Can anyone shed some light on the issue?
thanks,

Alejandro Mesa
9/22/2003 9:06:17 AM
Try using the table owner.

exec master..xp_sendmail @recipients='aezza@msn.com',
@subject='test',@message='test message', @query='select
top 1 * from TestDB.dbo.TestTable'



AMB

Tibor Karaszi
9/22/2003 2:57:36 PM
I would try adding N in front of the/some string parameters, to see if there's something strange
with xp_sendmail expecting Unicode data.

--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver


[quoted text, click to view]

aerick
9/22/2003 5:20:56 PM
hi tibor,

Thanks for you suggestion. But it is still giving the
same error with unicode strings.


[quoted text, click to view]
aerick
9/22/2003 5:26:07 PM
hey alejandro,

I've tried it with fully qualifying all objects, with
dbo, but to no avail.


[quoted text, click to view]
AddThis Social Bookmark Button