|
 |
asp_cdo thread: ActiveX component can't create object
Message #1 by "anandhi" <anandhi.p@u...> on Wed, 14 Feb 2001 05:27:53
|
|
Hi,
i am getting the error
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object in the below code.can u help me
out.
anandhi.p
<%@ Language="VBScript" %>
<%Option Explicit %>
<%
Dim strFrom
Dim strSubject
Dim strMessage
Dim objCDO
strFrom=Request.Form("txtFrom")
strSubject=Request.Form("txtSubject")
strMessage=Request.Form("txtAreaMessage")
Response.Write("strFrom" & strFrom & "<br>")
Response.Write("strSubject" & strSubject & "<br>")
Response.Write("strMessage" & strMessage & "<br>")
if(strFrom <> "" and strSubject <> "" and strMessage <> "") then
Set objCDO = CreateObject("CDONTS.NewMail")
objCDO.To="anandhi.p@u..."
objCDO.From=strFrom
objCDO.cc="mailto_anandhi_p@r..."
objCDO.Subject=strSubject
objCDO.Body=strMessage
objCDO.Send
Response.Redirect "Error.asp?strErrMsg=Your%20Mail%20has%been%
20sent.&frmpg=mailConfirm"
End If
%>
Message #2 by "Selva" <selva@e...> on Fri, 16 Feb 2001 10:32:10 +0530
|
|
Hi,
You have to use Server.CreateObject("CDONTS.NewMail") instead of the
createobject you have used. You can use createobject if you are inheriting
the cdonts object in visual basic, but not in asp.
Hope its helpful to u.
Selva.
----- Original Message -----
From: "anandhi" <anandhi.p@u...>
To: "ASP CDO" <asp_cdo@p...>
Sent: Wednesday, February 14, 2001 5:27 AM
Subject: [asp_cdo] ActiveX component can't create object
> Hi,
> i am getting the error
> Microsoft VBScript runtime error '800a01ad'
>
> ActiveX component can't create object in the below code.can u help me
> out.
>
> anandhi.p
>
>
> <%@ Language="VBScript" %>
> <%Option Explicit %>
>
> <%
> Dim strFrom
> Dim strSubject
> Dim strMessage
>
>
> Dim objCDO
>
> strFrom=Request.Form("txtFrom")
> strSubject=Request.Form("txtSubject")
> strMessage=Request.Form("txtAreaMessage")
>
> Response.Write("strFrom" & strFrom & "<br>")
> Response.Write("strSubject" & strSubject & "<br>")
> Response.Write("strMessage" & strMessage & "<br>")
>
>
> if(strFrom <> "" and strSubject <> "" and strMessage <> "") then
>
>
> Set objCDO = CreateObject("CDONTS.NewMail")
>
> objCDO.To="anandhi.p@u..."
> objCDO.From=strFrom
> objCDO.cc="mailto_anandhi_p@r..."
> objCDO.Subject=strSubject
> objCDO.Body=strMessage
>
> objCDO.Send
> Response.Redirect "Error.asp?strErrMsg=Your%20Mail%20has%been%
> 20sent.&frmpg=mailConfirm"
> End If
>
>
>
>
> %>
>
|
|
 |