ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=mydb;Data Source=myserver"
Set dbconn = CreateObject("ADODB.Connection")
dbconn.Open ConnectionString
DIM cmd
SET cmd = server.CreateObject("ADODB.Command")
SET cmd.ActiveConnection = Connection
cmd.CommandText = "xp_sendmail"
cmd.CommandType = 4
cmd.Parameters("@Recipients") = "me@me.com"
cmd.Parameters("@Subject") = "Test"
cmd.Parameters("@message") = "Test"
cmd.Execute
我的脚本给了我一个错误:
需要对象:'server'
任何帮助将不胜感激。谢谢!