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
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
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 > > >