Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Tue, 10 Jan 2006 13:06:04 -0800,    group: microsoft.public.exchange2000.development        back       


Adodb record.fields read only   
Hello,
I'm trying to create a new record in Exchange using the adodb.record object. 
According to several codesnippets I've looked into this should work:

VB.Net 2005 code:
Dim rec As ADODB.Record = New ADODB.Connection
        rec.Open("http://localhost/public/project/issues/testissue.eml")
        rec.Fields("DAV:contentclass") = "arflebarflefloop"
        rec.Fields.Update()

Now Visual studio tells me that the 'property 'Item' is Read Only.

What am I doing wrong? Help is appreciated.

Stefan
date: Tue, 10 Jan 2006 13:06:04 -0800   author:   Stefan de Groot

Re: Adodb record.fields read only   
You need to make sure when you open the record you open its as readwrite as 
exchange defaults to read otherwise. Also in .NET you need specify the 
property your trying to use eg

rec.Fields("DAV:contentclass").value = "arflebarflefloop"

I would also have a look at the code sample in 
http://support.microsoft.com/default.aspx?id=314362 this is a much better 
way to write something like this

I also don't believe the localhost is valid in a Exoledb URI you need to use 
the servername as DNS is not used see 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_exch2k_the_http_url_scheme.asp

Cheers
Glen

"Stefan de Groot"  wrote in message 
news:397FA633-55BC-4222-B759-D9A320B326E7@microsoft.com...
> Hello,
> I'm trying to create a new record in Exchange using the adodb.record 
> object.
> According to several codesnippets I've looked into this should work:
>
> VB.Net 2005 code:
> Dim rec As ADODB.Record = New ADODB.Connection
>        rec.Open("http://localhost/public/project/issues/testissue.eml")
>        rec.Fields("DAV:contentclass") = "arflebarflefloop"
>        rec.Fields.Update()
>
> Now Visual studio tells me that the 'property 'Item' is Read Only.
>
> What am I doing wrong? Help is appreciated.
>
> Stefan
date: Wed, 11 Jan 2006 11:10:51 +1100   author:   Glen Scales [MVP]

Re: Adodb record.fields read only   
It's just to simple to be true. Thanks for your help Glen! That did it.
Cheers!
Stefan
-- 
Bits and bites wont break my rights.


"Glen Scales [MVP]" wrote:

> You need to make sure when you open the record you open its as readwrite as 
> exchange defaults to read otherwise. Also in .NET you need specify the 
> property your trying to use eg
> 
> rec.Fields("DAV:contentclass").value = "arflebarflefloop"
> 
> I would also have a look at the code sample in 
> http://support.microsoft.com/default.aspx?id=314362 this is a much better 
> way to write something like this
> 
> I also don't believe the localhost is valid in a Exoledb URI you need to use 
> the servername as DNS is not used see 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_exch2k_the_http_url_scheme.asp
> 
> Cheers
> Glen
> 
> "Stefan de Groot"  wrote in message 
> news:397FA633-55BC-4222-B759-D9A320B326E7@microsoft.com...
> > Hello,
> > I'm trying to create a new record in Exchange using the adodb.record 
> > object.
> > According to several codesnippets I've looked into this should work:
> >
> > VB.Net 2005 code:
> > Dim rec As ADODB.Record = New ADODB.Connection
> >        rec.Open("http://localhost/public/project/issues/testissue.eml")
> >        rec.Fields("DAV:contentclass") = "arflebarflefloop"
> >        rec.Fields.Update()
> >
> > Now Visual studio tells me that the 'property 'Item' is Read Only.
> >
> > What am I doing wrong? Help is appreciated.
> >
> > Stefan 
> 
> 
>
date: Wed, 11 Jan 2006 01:16:03 -0800   author:   Stefan de Groot

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us