[IronPython] A help With an Active Directory DateTime field

Vizcayno vizcaynot at gmail.com
Sat Dec 15 01:45:30 CET 2007


I am trying to save data into meetingStartTime Active Directory (AD)
Field. AD is under a w3k (last SP applied) server. I show you the
code:
import clr
import System
clr.AddReferenceByPartialName("System.DirectoryServices")
root=System.DirectoryServices.DirectoryEntry()
s=System.DirectoryServices.DirectorySearcher()
s.Filter = "(samaccountname=gnogales)"
r=s.FindOne()
entry = r.GetDirectoryEntry()
entry.Properties["meetingStartTime"].Value = System.DateTime(1962, 5,
15, 0, 0, 0)
entry.CommitChanges()
entry.Close()

But I have the next error in the commit process:
Traceback (most recent call last):
  File , line 0, in ##232
  File , line 0, in _stub_##218
  File System.DirectoryServices, line unknown, in CommitChanges
EnvironmentError: The requested operation did not satisfy one or more
constraints associated with the class of the object. (Exception from
HRESULT: 0x80072014)

The field in AD is considered as DateTime. I have the same for all Ipy
versions.

What do you is happending?
Thanks!!




More information about the Ironpython-users mailing list