"Tim Munro" <Excelsior@xxxxxx> wrote in message
> Hi all, I have a question relating to object propery caches and retreival
> and update methods.
> What is the difference between let's say:
> sInfo = oUser.get("info") and
> sInfo = oUser.info?
> If the property does not exist in the cache, do they both return the
> E_ADS_PROPERTY_NOT_FOUND code?
> In each case will sinfo be "Empty" or "Null"?
> Which is the proper method to use and which is the preferred method to
> Similar questions for the .put method. If the property does not exist in
> the cache and you need to create it, what's the proper way to do so?
> Thanks very much
If you use oUser.Get("info"), an error is raised (property cannot be found
in cache) if no value is assigned. If you use
sInfo = oUser.info
then sInfo will be Empty if info has no value. Otherwise, they are the same.
If you use Get you almost need to trap errors. I seldom use it as a result.
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net