I have the vbscript code below in my asp page. It calls a stored procedure that sends a SQL email. I know it works because i receive the email. But it never reaches the line after cmd.Execute. The html view source is pasted below as well. If I comment out the cmd.Execute line, then the next line is reached. This is driving me crazy! I have other pages that do something similar and I haven't had this problem before.
cmdSendIt__TenderNumber = newnumber
cmdSendIt__UserId = Session("MM_Username")
set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = MM_Connection_STRING
cmd.CommandText = "dbo.sp_SendeMail_Tenders"
cmd.Parameters.Append cmd.CreateParameter("@TenderNumber",3,1,8,cmdSendIt__TenderNumber)
cmd.Parameters.Append cmd.CreateParameter("@UserId",200,1,10,cmdSendIt__UserId)
cmd.CommandType = 4
cmd.CommandTimeout = 0
cmd.Prepared = true
cmd.Execute
response.Write "hello?"
response.end
here is the view source of the page I get after cmd.execute above executes:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD>
<BODY></BODY></HTML>
that's it! what is going on here? is the stored procedure returning an error? I don't see any error and it does send the email, which is the last thing it does. i have tried setting ansi_warnings and nocount on and off in the stored procedure, but it doesn't seem to make a difference. I've also tried adjusting the Command.Timeout value (even though the stored procedure executes quickly), to no avail.
Thanks in advance for your help!
cmdSendIt__TenderNumber = newnumber
cmdSendIt__UserId = Session("MM_Username")
set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = MM_Connection_STRING
cmd.CommandText = "dbo.sp_SendeMail_Tenders"
cmd.Parameters.Append cmd.CreateParameter("@TenderNumber",3,1,8,cmdSendIt__TenderNumber)
cmd.Parameters.Append cmd.CreateParameter("@UserId",200,1,10,cmdSendIt__UserId)
cmd.CommandType = 4
cmd.CommandTimeout = 0
cmd.Prepared = true
cmd.Execute
response.Write "hello?"
response.end
here is the view source of the page I get after cmd.execute above executes:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD>
<BODY></BODY></HTML>
that's it! what is going on here? is the stored procedure returning an error? I don't see any error and it does send the email, which is the last thing it does. i have tried setting ansi_warnings and nocount on and off in the stored procedure, but it doesn't seem to make a difference. I've also tried adjusting the Command.Timeout value (even though the stored procedure executes quickly), to no avail.
Thanks in advance for your help!