473,378 Members | 1,492 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,378 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 4460
>' 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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.