473,394 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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.Connection = New ADODB.Connection()
' For server change oCn.Provider to "exoledb.datasource";
oCn.Provider = "exoledb.datasource"

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

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

oFields = iConfg.Fields
oFields.Item(CDO.CdoCalendar.cdoTimeZoneIDURN).Val ue =
CDO.CdoTimeZoneId.cdoPacific
' TODO: Set Meeting Organizer
oFields.Item(CDO.CdoConfiguration.cdoSendEmailAddr ess).Value =
"or*******@example.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.FirstName = "FirstTrial"
oContact.LastName = "LastTrial"
oContact.Configuration = iConfg

oContact.DataSource.SaveTo sURL, , _
ADODB.ConnectModeEnum.adModeReadWrite, _
ADODB.RecordCreateOptionsEnum.adCreateNonCollectio n, _
ADODB.RecordOpenOptionsEnum.adOpenSource, _
"", ""
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.RecordCreateOptionsEnum.adCreateNonCollecti on" to
"ADODB.RecordCreateOptionsEnum.adCreateOverwri te". But it gives me the
error as "Unspecified 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 1321

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

Similar topics

6
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...
28
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()',...
54
by: tshad | last post by:
I have a function: function SalaryDisplay(me) { var salaryMinLabel = document.getElementById("SalaryMin"); salaryMinLabel.value = 200; alert("after setting salaryMinLabel = " +...
2
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...
11
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...
26
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...
4
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
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"))...
6
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.