Groups | Blog | Home
all groups > c# > october 2005 >

c# : public folder permissions using exoledb


Nicholas Paldino [.NET/C# MVP]
10/31/2005 4:21:43 PM
Morten,

Does the error occur on the call to Update, or when you set the field?
Also, are you sure that the XML that you are passing is valid for that
field?


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

[quoted text, click to view]

Morten
10/31/2005 10:08:01 PM
Hi!

I'm trying to use exoledb to apply permissions to a public folder.

My code looks like:

ADORecord = new ADODB.RecordClass();
ADOConn = new ADODB.ConnectionClass();

ADOConn.Provider = "ExOLEDB.DataSource";

ADOConn.Open(folderURL,Server_usr,Server_pwd,0);

ADORecord.Open(folderURL, ADOConn,
ADODB.ConnectModeEnum.adModeReadWrite,
ADODB.RecordCreateOptionsEnum.adFailIfNotExists,
ADODB.RecordOpenOptionsEnum.adOpenSource,
Server_usr, Server_pwd);

ADOFlds = ADORecord.Fields;

StringWriter sw = new StringWriter();
XmlTextWriter xw = new XmlTextWriter(sw);
xmlDoc.WriteTo(xw);
string XMLDesc = sw.ToString();

ADOFlds["http://schemas.microsoft.com/exchange/security/descriptor"].Value
= XMLDesc;
ADOFlds.Update();

When the last line is reached I receive the error: "The parameter is
incorrect."

Does anyone know what I'm doing wrong?

Help is appreciated

Morten

AddThis Social Bookmark Button