Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

error message using the sp_send_dbmail

 
   Database Help (Home) -> Programming RSS
Next:  The Query From Hell  
Author Message
Patrick

External


Since: Aug 28, 2007
Posts: 11



(Msg. 1) Posted: Mon Feb 09, 2009 12:16 pm
Post subject: error message using the sp_send_dbmail
Archived from groups: microsoft>public>sqlserver>programming (more info?)

good day,

When executing the following code:
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'SQLadmin',
@recipients = 'sqladmin@NRCan.gc.ca',
@body = 'The following Databases need your attention: ',
@query = 'Select * from dbo.##Tbl_CombinedInfo',
@subject = 'TESTING email feature from SQL 2005',
@attach_query_result_as_file = 0;

I get the following error:
Msg 22050, Level 16, State 1, Line 0
Error formatting query, probably invalid parameters

If i remove the @query variables, then it runs great. Can anyone shead some
light as to why it's giving an error message that i've got invalid parameters?

Thank you very much.

 >> Stay informed about: error message using the sp_send_dbmail 
Back to top
Login to vote
David Masciangelo

External


Since: Mar 17, 2009
Posts: 1



(Msg. 2) Posted: Tue Mar 17, 2009 10:38 am
Post subject: RE: error message using the sp_send_dbmail [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I am having the same issue. were you able to solve this?

"Patrick" wrote:

> good day,
>
> When executing the following code:
> EXEC msdb.dbo.sp_send_dbmail
> @profile_name = 'SQLadmin',
> @recipients = 'sqladmin@NRCan.gc.ca',
> @body = 'The following Databases need your attention: ',
> @query = 'Select * from dbo.##Tbl_CombinedInfo',
> @subject = 'TESTING email feature from SQL 2005',
> @attach_query_result_as_file = 0;
>
> I get the following error:
> Msg 22050, Level 16, State 1, Line 0
> Error formatting query, probably invalid parameters
>
> If i remove the @query variables, then it runs great. Can anyone shead some
> light as to why it's giving an error message that i've got invalid parameters?
>
> Thank you very much.

 >> Stay informed about: error message using the sp_send_dbmail 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
sp_send_dbmail: Error formatting query, probably invalid p.. - Hi When using sp_send_dbmail as follows, I receive an email: EXEC msdb.dbo.sp_send_dbmail @profile_name = 'Mail', @recipients = 'some.one@somewhere.com', @body = 'Customer Cleansing Status BODY', @subject = 'Customer Cleansing..

Rollback whole transaction save/keep error message/error s.. - Hi all, In SQL 2005, is it possible to rollback the entire transaction but save/keep the system generated error message/error severity information some where? I tried to store the error message in local memory but once rollback I lost it. Any ideas..

Error Message - Microsoft Cursor Engine error '80040e21' Multiple-step operation generated errors. Check each status value. /Easitrak2006/Form2.asp, line 158 Can someone tell me what is error is?

ERROR MESSAGE - Anyone have a idea about what is meant by below? /****************************************/ Cannot roll back ken. No transaction or savepoint of that name was found. Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION..

sp_send_dbmail - Hello, I'm developing a html mailshot using sp_send_dbmail. It is functioning perfectly except that the html received in the email is truncated to 2000 characters. I suspect that the mail server may have a 2000 character limit on messages. Can you..
   Database Help (Home) -> Programming All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]