L
led
Microsoft VBScript runtime error '800a01a8'
Object required: ''
this is the error i get with this code
<%
Dim meumail
Dim myCDONTSMail
Dim strFrom
Dim strTo
Dim strSubject
Dim strBody
Dim strparamim
Dim strSubject2
Dim strBody2
Dim myConnString
Dim myConnection
Dim mySQL
dim id
strFrom="(e-mail address removed)"
strSubject2="Alteração de disponibilidade"
strBody2="Alteracao"
id=request.form("id")
myConnString = Application("basededados1_ConnectionString")
Set myConnection = Server.CreateObject("ADODB.Connection")
myConnection.Open myConnString
mySQL= "DELETE prereserva.* FROM prereserva WHERE id="
mySQL=mySQL & request.form("id")
mySQL=mySQL & " And situacao='Aguarda confirmação com envio de sinal de
30%'"
Response.Write(mysql)
set recs=Server.CreateObject("ADODB.recordset")
recs.Open "SELECT prereserva.* FROM prereserva WHERE id="& id & "And
situacao='Aguarda confirmação com envio de sinal de 30%'", myConnString
do while not recs.eof
strTo=recs.Fields.Item("email")
strSubject = "Pré reserva " & recs.Fields.Item("n_prereserva")& " foi
suplantada "
strBody = "<html>"
strBody = strBody & "<head></head>"
strBody = strBody & "<body>"
strBody = strBody & Chr(13) & "A sua prereserva foi suplantada"
strBody = strBody & Chr(13) & "Obrigado.Esperamos que o nosso serviço vá de
encontro ás suas expectativas."
strBody = strBody & "</body>"
strBody = strBody & "</html>"
Set myCDONTSMail = CreateObject("CDONTS.NewMail")
set meumail = CreateObject("CDONTS.NewMail")
meumail.bodyformat=0
meumail.mailformat=0
mycdontsmail.mailformat=0
mycdontsmail.bodyformat=0
myCDONTSMail.Send strFrom,strto,strSubject2,strBody
recs.movenext
loop
meumail.Send strFrom,"(e-mail address removed)",strSubject2,strBody2
Set myCDONTSMail = Nothing
Set meumail=nothing
myConnection.Execute mySQL
myConnection.Close
Set myConnection = Nothing
%>
in the meumail.send statement
i can´t figure why..
Object required: ''
this is the error i get with this code
<%
Dim meumail
Dim myCDONTSMail
Dim strFrom
Dim strTo
Dim strSubject
Dim strBody
Dim strparamim
Dim strSubject2
Dim strBody2
Dim myConnString
Dim myConnection
Dim mySQL
dim id
strFrom="(e-mail address removed)"
strSubject2="Alteração de disponibilidade"
strBody2="Alteracao"
id=request.form("id")
myConnString = Application("basededados1_ConnectionString")
Set myConnection = Server.CreateObject("ADODB.Connection")
myConnection.Open myConnString
mySQL= "DELETE prereserva.* FROM prereserva WHERE id="
mySQL=mySQL & request.form("id")
mySQL=mySQL & " And situacao='Aguarda confirmação com envio de sinal de
30%'"
Response.Write(mysql)
set recs=Server.CreateObject("ADODB.recordset")
recs.Open "SELECT prereserva.* FROM prereserva WHERE id="& id & "And
situacao='Aguarda confirmação com envio de sinal de 30%'", myConnString
do while not recs.eof
strTo=recs.Fields.Item("email")
strSubject = "Pré reserva " & recs.Fields.Item("n_prereserva")& " foi
suplantada "
strBody = "<html>"
strBody = strBody & "<head></head>"
strBody = strBody & "<body>"
strBody = strBody & Chr(13) & "A sua prereserva foi suplantada"
strBody = strBody & Chr(13) & "Obrigado.Esperamos que o nosso serviço vá de
encontro ás suas expectativas."
strBody = strBody & "</body>"
strBody = strBody & "</html>"
Set myCDONTSMail = CreateObject("CDONTS.NewMail")
set meumail = CreateObject("CDONTS.NewMail")
meumail.bodyformat=0
meumail.mailformat=0
mycdontsmail.mailformat=0
mycdontsmail.bodyformat=0
myCDONTSMail.Send strFrom,strto,strSubject2,strBody
recs.movenext
loop
meumail.Send strFrom,"(e-mail address removed)",strSubject2,strBody2
Set myCDONTSMail = Nothing
Set meumail=nothing
myConnection.Execute mySQL
myConnection.Close
Set myConnection = Nothing
%>
in the meumail.send statement
i can´t figure why..