473,569 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Object cannot be created at this URL because an object named by thisURL already exists

Hi All,
I want to develop one application in vb.net for exchange 2000.

I tried to add one contact with the code snippet below. The same logic
is there for appointment on Microsoft's site.
(I added Microsoft CDO exchange library for 2000 & activex data object
2.5 reference to the project)

Dim sURL As String
sURL = "http://sbsserver/Exchange/trial/contacts"

Dim oCn As ADODB.Connectio n = New ADODB.Connectio n()
' For server change oCn.Provider to "exoledb.dataso urce";
oCn.Provider = "exoledb.dataso urce"

oCn.Open(sURL, "", "", 0)
If oCn.State = 1 Then
Console.WriteLi ne("Good Connection")
Else
Console.WriteLi ne("Bad Connection")
Return
End If

Dim iConfg As CDO.Configurati on = New CDO.Configurati on()
Dim oFields As ADODB.Fields

oFields = iConfg.Fields
oFields.Item(CD O.CdoCalendar.c doTimeZoneIDURN ).Value =
CDO.CdoTimeZone Id.cdoPacific
' TODO: Set Meeting Organizer
oFields.Item(CD O.CdoConfigurat ion.cdoSendEmai lAddress).Value =
"or*******@exam ple.com"
oFields.Update( )

' Below is my code in which I just removed the logic of creation of
appointment with creation of contact

Dim oContact As New CDO.Person
' *************** *************** *********
oContact.FirstN ame = "FirstTrial "
oContact.LastNa me = "LastTrial"
oContact.Config uration = iConfg

oContact.DataSo urce.SaveTo sURL, , _
ADODB.ConnectMo deEnum.adModeRe adWrite, _
ADODB.RecordCre ateOptionsEnum. adCreateNonColl ection, _
ADODB.RecordOpe nOptionsEnum.ad OpenSource, _
"", ""
oContact = Nothing

oCn.Close()
oCn = Nothing
oFields = Nothing
' *************** *************** *********

Now here if I run the program for first time, my contact is
successfully get created in the trial's contacts folder. But if I run
this program second time, it gives me error "Object cannot be created
at this URL because an object named by this URL already exists". On
some forum, the solution to error is given as - Try to create the
contact with readWrite & Overwrite attribs. So I changed the above
creation code from
"ADODB.RecordCr eateOptionsEnum .adCreateNonCol lection" to
"ADODB.RecordCr eateOptionsEnum .adCreateOverwr ite". But it gives me the
error as "Unspecifie d error". So how I can create a contact or modify
existing contact in the trial's mailbox?
Further how I can create the task for Trial using similar code above?
Also please anyone point me to the right direction where I can get the
knowledge about step by step exchange programming on the internet?

Thanks in advance
Jan 11 '08 #1
0 1332

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2457
by: lawrence | last post by:
How dangerous or stupid is it for an object to have a reference to the object which contains it? If I have a class called $controllerForAll which has an arrray of all the objects that exist, what happens if one of those objects, when it is created, takes a reference to the object that contains it? Do bad things happen? class McShow {
28
20290
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()', this.pinginterval); - but is there no way to do this without using the literal ObjectName? If I write 'this.methodName()' I get "Line 1 Char 1: Object...
54
4527
by: tshad | last post by:
I have a function: function SalaryDisplay(me) { var salaryMinLabel = document.getElementById("SalaryMin"); salaryMinLabel.value = 200; alert("after setting salaryMinLabel = " + salaryMinLabel.value); } I also have an asp.net object:
2
1175
by: WJ | last post by:
I have a Database class that is responsible for performing DBIO to/from Oracle RDBMS named "oraDBIOClass". It is c#. I have about 20 Asp.Net forms (*.aspx) in my web site, their Url Links are located on a common launch pad (graphic with hot spots), each calls different methods within the oraDBIOClass. Questions: 1. When an instance of...
11
3810
by: Kevin Prichard | last post by:
Hi all, I've recently been following the object-oriented techiques discussed here and have been testing them for use in a web application. There is problem that I'd like to discuss with you experts. I would like to produce Javascript classes that can be "subclassed" with certain behaviors defined at subclass time. There are plenty of...
26
5649
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized several parts of the DOM, but this does not include the window object. Thank you
4
2110
by: alex | last post by:
I am so confused with these three concept,who can explained it?thanks so much? e.g. var f= new Function("x", "y", "return x * y"); function f(x,y){ return x*y } var f=function(x,y){
4
6262
by: rn5a | last post by:
Consider the following code: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) Dim dInfo As DirectoryInfo dInfo = New DirectoryInfo(Server.MapPath("/Folder1")) dgFD.DataSource = dInfo.GetFiles("*.*") dgFD.DataBind() End Sub
6
2508
by: roman.muntyanu | last post by:
Hi All, I have a program that can be started as windows service or as an windows app. I need to avoid starting this program as an application if it is already started as a win service. In code when program starts as a win service I create named mutex. Then if user tries to start program as a win application I am checking if Mutex with...
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.