Wrox Programmer Forums
Classic ASP Professional For advanced coder questions in ASP 3. 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 Professional 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 October 19th, 2005, 04:04 AM
Registered User
Join Date: Oct 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Object already exists. (MyCDONTSMail)

I have a web page which works perfectly on a system. But when I put it to production, it displays:

Error Type:
Object already exists.
 /test/iindex.asp, line 82

Here is my code.
I noticed that if I removed the line " MyCDONTSMail.Send".(Which is also the line 82) I will not get any error but then I won't get my mail sent either.

    MyCDONTSMail.Subject="PCQ-Pre-Alert ~" & Title& ""

    set MyCDONTSMail=nothing

I need to get the mail working by getting this object already exisits error fixed. Any help is greatly appreciated!

Old October 29th, 2005, 04:08 AM
Registered User
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Try checking for the existance of the object before creating it.

if NOT IsObject(MyCDONTSMail) then
    response.write "New Mail Object created"
    SET MyCDONTSMail= Server.CreateObject"CDONTS.NewMail")
end if

Similar Threads
Thread Thread Starter Forum Replies Last Post
Check if Div Layer/Object Exists lian_a Javascript How-To 5 April 23rd, 2008 01:53 AM
check whether COM object exists EddyT C# 0 June 15th, 2007 04:10 AM
Check if Object Exists in the Database Coby Access VBA 2 June 7th, 2007 02:56 PM

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