Showing posts with label systemdatasqlclientsqlexception. Show all posts
Showing posts with label systemdatasqlclientsqlexception. Show all posts

Friday, March 9, 2012

I am getting this message "System.Data.SqlClient.SqlException: xp_sendmail: Procedure expe

I have looked all over my code and can not find anywhere that I am referencing the xp_sendmail procedure!
Here is all the code
<code>
With sqlCmdUpdateParticipants

.Parameters("@.ClassID").Value = ddlClass.SelectedItem.Value

.Parameters("@.Person").Value = tbName.Text()

EndWith

cnCapMaster.Open()

sqlCmdUpdateParticipants.ExecuteNonQuery()

cnCapMaster.Close()
</code>
I am just getting a couple values and and inserting them into the database. the insert works then I get darn error message. This code worked at one time but it has been about 2 years sense I worked on it so who knows what might have happened sense then.
Thanks,
Bryan

Whats in your stored proc?

Nick

|||

How dumb of me not to include this

here is the code

<code>
INSERT INTO dbo.ClassPatricians
(ClassID, Person)
VALUES (@.classID, @.person)

</code>

|||Would you happen to have any triggers or anything on that table that is trying to send email?
Nick|||None that I can find. The only stored procedure has to do with dropping tables! This is just the strangest thing. Would I find the code somewhere other then under stored procedures in enterprise manager?
Thanks,
Bryan|||

Not that it would be causing the issue here, but it could be under DTS packages or SQL Jobs as well. I'd check my functions as well to make sure there is no call in them either. The best way to look for this is to go to your database in enterprise manager > right click on your database > All Tasks > Generate SQL Script > Show All > Click Script All Objects > Under Options, Script Triggers. Back under General click Preview. When it completes, Click copy, and then go to notepad or something similar, and look for xp_sendmail.

Nick

|||

nick-w wrote:

Not that it would be causing the issue here, but it could be under DTS packages or SQL Jobs as well. I'd check my functions as well to make sure there is no call in them either. The best way to look for this is to go to your database in enterprise manager > right click on your database > All Tasks > Generate SQL Script > Show All > Click Script All Objects > Under Options, Script Triggers. Back under General click Preview. When it completes, Click copy, and then go to notepad or something similar, and look for xp_sendmail.

Nick


Thank you oh Jedi Master... you solved the problem. I will so use that trick again!!!
Thanks,
Bryan