public folder permissions using exoledb
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
public folder permissions using exoledb

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Morten
Guest





Posted: Tue Nov 01, 2005 1:58 am    Post subject: public folder permissions using exoledb Reply with quote

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

Back to top
Nicholas Paldino [.NET/C#
Guest





Posted: Tue Nov 01, 2005 1:58 am    Post subject: Re: public folder permissions using exoledb Reply with quote

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

"Morten" <morten_skovgaard@hotmail.com> wrote in message
news:uLzFr8l3FHA.3540@TK2MSFTNGP10.phx.gbl...
Quote:
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
Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
New Topics Powered by phpBB