473,326 Members | 2,076 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,326 software developers and data experts.

DirectoryServices: Remove user object property

Hi,

The CommitChanges method returns an error after earlier property
..Remove methods are successfull.

The error is:

"The attribute syntax specified to the directory service is invalid."

'code:
' oAdDirEntry is a Directory Services DirectoryEntry object, which is
an AD user object.
'The mDBOverHardQuotaLimit attribute exists for that user object

oAdDirEntry.Properties("mDBOverHardQuotaLimit").Re move("mDBOverHardQuotaLimit")
oAdDirEntry.CommitChanges()

Thank you for your help,

S. Lemen

Aug 29 '05 #1
3 4455
>' oAdDirEntry is a Directory Services DirectoryEntry object, which is
an AD user object.
'The mDBOverHardQuotaLimit attribute exists for that user object

oAdDirEntry.Properties("mDBOverHardQuotaLimit").R emove("mDBOverHardQuotaLimit")
oAdDirEntry.CommitChanges()


Try the .Clear() method:

oAdDirEntry.Properties("mDBOverHardQuotaLimit").Cl ear();
oAdDirEntry.CommitChanges()

Does this work by any chance?

Marc
================================================== ==============
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch
Aug 29 '05 #2
Yes, that worked.

Thank you.

S. Lemen

Aug 29 '05 #3
The reason that doesn't work is that you have to specify the value to remove
(and not the attribute name). You can conceive this as a kind of double
check althought it is actually necessary only when you want to remove one
specific value of a multi-valued attribute

/LM

"Marc Scheuner [MVP ADSI]" <m.********@inova.SPAMBEGONE.ch> wrote in message
news:3f********************************@4ax.com...
' oAdDirEntry is a Directory Services DirectoryEntry object, which is
an AD user object.
'The mDBOverHardQuotaLimit attribute exists for that user object

oAdDirEntry.Properties("mDBOverHardQuotaLimit"). Remove("mDBOverHardQuotaLimit")
oAdDirEntry.CommitChanges()


Try the .Clear() method:

oAdDirEntry.Properties("mDBOverHardQuotaLimit").Cl ear();
oAdDirEntry.CommitChanges()

Does this work by any chance?

Marc
================================================== ==============
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch

Aug 29 '05 #4

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

Similar topics

0
by: kovac | last post by:
The System.directoryservices.dll has an error, and this error was described in http://support.microsoft.com/default.aspx?scid=kb;en-us;839424 At the moment we have Framework version v1.0.3705 and...
3
by: Sean | last post by:
I figured I'd start this post on the .NET general forum instead of the ADSI forum but feel free to nudge me along if I am looking in the wrong place. I am working with System.DirectoryServices...
0
by: news.microsoft.com | last post by:
Greetings, I am building a ASPX UI that will allow a HR representative manage the AD Organization. I have a class that wraps a lot of AD work and I do things like change password and update the...
3
by: S. Lemen | last post by:
Hi, The CommitChanges method returns an error after earlier property ..Remove methods are successfull. The error is: "The attribute syntax specified to the directory service is invalid." ...
3
by: chat_devil | last post by:
hi, does anyone know if it is possible to remove an attribute that can not be read into the ADSI property cache/collection. i'm trying to do an eDirectory password change from .net directory...
6
by: Mark Rae | last post by:
Hi, I'm in the process of updating an ASP.NET v1.1 web app to v2. The app uses ActiveDirectory a great deal, and I'm trying to use the new System.Collections.Generic namespace where possible,...
6
by: bugnthecode | last post by:
Hi, I'm building a small desktop app in VS Std 2005 with C# and .net 2.0. I've managed to get the code together to query the ldap my company has, but every time I attempt to access a specific...
5
by: Peter Bradley | last post by:
I'm trying to use System.DirectoryServices to update Active Directory from a Web Service. When I try to commit the changes, I get the following error message: "A constraint violation occurred....
7
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I am using this code to get groups for a user and getting a error (5) on the GetAuthorizationGroups() function . There are two domains. This function works on the local domain but does not work...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.