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
My script gives me an error:
Object required: 'server'
Any help will be appreciated. Thanks!
Look here to learn why and how to .Append parameters.