Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 18th, 2005, 11:31 AM
Authorized User
 
Join Date: Jan 2005
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to p2ptolu Send a message via Yahoo to p2ptolu
Default Please help with this am held up

I used the code below and i had this error : Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/changerequp/changerequestfn.asp, line 83

and this is line 83 : Set objMail = Server.CreateObject("CDONTS.NewMail")

please help me and i also want to be able to display the following data on a page with the most recent on top, and also send the link of the most recently filled form to the e-mail address below and also send the form details to the e-mail address below , thank you.




<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<%
dim orset
dim stremailaddress
dim strRequestorName
set cnn = server.CreateObject("ADODB.connection")
cnn.open "provider=microsoft.jet.OLEDB.4.0;data source =" & server.mappath("db\ChangeRequest.mdb")
set orset = server.CreateObject("ADODB.recordset")
strSQL = "SELECT * FROM configurationchange;"

'Open the recordset with the SQL query
orset.Open strSQL, Cnn ,3,3

orset.AddNew



        oRset("Descofchange") = request.form("Descofchange")
        oRset("date") = request.form("date")
        oRset("Nameofrequestor") = request.form("Nameofrequestor")
        oRset("LocationofChange") = request.form("LocationofChange")
        oRset("ApprovedGM") = request.form("ApprovedGM")
        oRset("ApprovedCTO") = request.form("ApprovedCTO")
        oRset("emailaddress") = request.form("emailaddress")
        oRset("stafftoConfigChange") = request.form("stafftoConfigChange")
        oRset("stafftopassInfo") = request.form("stafftopassInfo")
        oRset("dateforChange") = request.form("dateforChange")
        oRset("Starttime") = request.form("Starttime")
        oRset("Downtime") = request.form("Downtime")
        oRset("endtime") = request.form("endtime")
        oRset("Emailaddress") = request.form("Emailaddress")
        oRset("RiskInvolved") = request.form("RiskInvolved")
        oRset("Impactoncustomers") = request.form("Impactoncustomers")
        oRset("CustomersAffected") = request.form("CustomersAffected")
        oRset("Reactive") = request.form("Reactive")
        oRset("ToCorrect") = request.form("ToCorrect")
        oRset("ToIncrease") = request.form("ToIncrease")
        oRset("Maintenance") = request.form("Maintenance")
        oRset("Hub") = request.form("Hub")
        oRset("ITNetwork") = request.form("ITNetwork")
        oRset("RFT") = request.form("RFT")
        oRset("TelSystem") = request.form("TelSystem")
        oRset("Other") = request.form("Other")
        oRset("Reason") = request.form("Reason")
        oRset("Approach") = request.form("Approach")
        oRset("FallbackProcedure") = request.form("FallbackProcedure")
        oRset("DocforUpdate") = request.form("DocforUpdate")
        oRset("Refdocument") = request.form("Refdocument")
        oRset("ChangeImpact") = request.form("ChangeImpact")


'orset("firstname") = Request.Form("firstname")
'orset.Fields("surname") = Request.Form("surname")
'orset.Fields("box1") = Request.Form("box1")
'orset.Fields("box2") = Request.Form("box2")

        Call SendRequestMail()
orset.Update
        stremailaddress = request.Form("emailaddress")
        strRequestorName = request.form("nameofrequestor")
        strDescofchange = request.form("descofchange")
        Sub SendRequestMail()

        strCrLf = Chr(13) & Chr(10)
        strSender = emailaddress
        strRecipient = "joy.imanyi@accelonafrica.com"
        strSubject = "Your REQUEST HAS BEEN APPROVED"
        strBody = "Dear " & strRequestorName & "," & strCrLf & strCrLf
        strBody = strBody & strDescofchange & strCrLf & strCrLf
        strBody = strBody & LocationofChange & strCrLf & strCrLf
        strBody = strBody & strPersontoImplementConfigChange
        strBody = strBody & strPersonresponsibletopassInformation
        strBody = strBody & " " & strCrLf & strCrLf
        strBody = strBody & "" & strCrLf & strCrLf
        strBody = strBody & ""
        strBody = strBody & "" & strCrLf & strCrLf
        strBody = strBody & "." & strCrLf & strCrLf


        'send email
        Dim objMail
        Set objMail = Server.CreateObject("CDONTS.NewMail")

        objMail.From = strSender
        objMail.To = strRecipient
        objMail.Subject = strSubject
        objMail.Body = strBody
        objMail.Send

        set objMail=nothing
    End Sub

orset.Close
Set orset = Nothing
Set cnn = Nothing
Response.Redirect "ChangeRequest.asp"


%>

 
Old May 19th, 2005, 07:43 AM
Authorized User
 
Join Date: Jul 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to raj_makro
Default

Use of CDONTS is deprecated in windows 2000 and support for CDONTS object is removed from there onwards. So if your OS is beyond windows 2000 ie XP or greater then use CDO object instead.
http://www.w3schools.com/asp/asp_send_email.asp

Regards
Raj





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to integrate a hand-held bar code scanner suneet.pant Pro VB.NET 2002/2003 4 March 4th, 2008 06:06 AM
Auto Reboot Error - Privilage not held... remya1000 General .NET 0 October 1st, 2007 10:16 PM
track mouse position while it's held down and move lina10 VBScript 0 April 9th, 2007 12:50 AM
Use Hand Held Scanner Mahavishnu Classic ASP Professional 1 November 16th, 2004 12:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.