J
Jeff Cochran
Does anyone have a code snippet or example on using the xp_sendmail
SQL procedure from an ASP page (VBscript)? I have no problem with the
stored procedure from a query and I think my problem is getting the
parameters passed to the procedure correctly, or just in using stored
procedures from ASP.
I can execute this SQL from Query Analyzer fine:
xp_sendmail "testuser", "Hello World!"
I've tried this in ASP:
strSQL = "EXEC xp_sendmail 'testuser', 'Hello World!'"
conn.Execute strSQL
But I don't get any error, no mail gets sent and it hangs my test
server. I'm using the SA account and password for the OLEDB
connection. Can't tell if the server is hanging in SQL or ASP, but it
locks up hard, no keyboard/mouse functions even work.
What the heck am I screwing up here...?
Jeff
SQL procedure from an ASP page (VBscript)? I have no problem with the
stored procedure from a query and I think my problem is getting the
parameters passed to the procedure correctly, or just in using stored
procedures from ASP.
I can execute this SQL from Query Analyzer fine:
xp_sendmail "testuser", "Hello World!"
I've tried this in ASP:
strSQL = "EXEC xp_sendmail 'testuser', 'Hello World!'"
conn.Execute strSQL
But I don't get any error, no mail gets sent and it hangs my test
server. I'm using the SA account and password for the OLEDB
connection. Can't tell if the server is hanging in SQL or ASP, but it
locks up hard, no keyboard/mouse functions even work.
What the heck am I screwing up here...?
Jeff