Home > Archive > MS SQL Server > February 2006 > Sending SMTP email









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Sending SMTP email
viktor

2006-02-28, 8:23 pm

I am trying to send SMTP email with attachment using cdosysmail and getting
error on this line:

EXEC @hr = sp_OAMethod @MailID, 'AddAttachment', NULL, @FileSource

Error message:

Msg 0, Level 11, State 0, Line 0

A severe error occurred on the current command. The results, if any, should
be discarded.

this store procedure is working on SQL 2000.

any help please.


John Bell

2006-02-28, 8:23 pm

Hi

Have you seen the example at http://www.aspfaq.com/show.asp?id=2403
also check out the xp_smtp_sendmail alternative as this should be alot
easier to implement.

You should also look at calling sp_OAGetErrorInfo to get error details.

John

"viktor" wrote:

> I am trying to send SMTP email with attachment using cdosysmail and getting
> error on this line:
>
> EXEC @hr = sp_OAMethod @MailID, 'AddAttachment', NULL, @FileSource
>
> Error message:
>
> Msg 0, Level 11, State 0, Line 0
>
> A severe error occurred on the current command. The results, if any, should
> be discarded.
>
> this store procedure is working on SQL 2000.
>
> any help please.
>
>
>

viktor

2006-02-28, 8:23 pm

I am getting this error description:
Output values of type Object are not allowed in result sets

"John Bell" < jbellnewsposts@hotma
il.com> wrote in message
news:23B0BAE4-FE53-4859-A6D6- 97E00453FC1F@microso
ft.com...[color=darkred]
> Hi
>
> Have you seen the example at http://www.aspfaq.com/show.asp?id=2403
> also check out the xp_smtp_sendmail alternative as this should be alot
> easier to implement.
>
> You should also look at calling sp_OAGetErrorInfo to get error details.
>
> John
>
> "viktor" wrote:
>


John Bell

2006-02-28, 8:23 pm

Hi

There is probably some error in the declarations of the variables you are
using. Try the code from the link I previously posted or from
http://tinyurl.com/r47n3

John

"viktor" wrote:

> I am getting this error description:
> Output values of type Object are not allowed in result sets
>
> "John Bell" < jbellnewsposts@hotma
il.com> wrote in message
> news:23B0BAE4-FE53-4859-A6D6- 97E00453FC1F@microso
ft.com...
>
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com