I have written a library that will access AD on the local DOMAIN to provide the parts needed to tell a user when their domain password will expire. The problem is that It works fine on the windows 2K development server- patch level current, but not on the w2k production server-- patch level behind-- or my windows xp Pro workstation-- patch level current. I have resolved one of the differences. When I access a result set from a query that contains the attibute "distinguishedName" using the provider ADSDSOObject I had to change the syntax <BR><BR>From: sUserDN = oResults("distinguishedName").value <BR><BR>To: sUserDN = join(oResults("distinguishedName").value) <BR><BR>to get it to work. The problem that I cannot resolve is that when I access a LargeInteger in the Production environment to extract or manipulate the "maxPwdAge" I get an error "The directory datatype cannot be converted to/from a native DS datatype." So I am either missing an update of some kind, MDAC or whatever, or my development machine is so out of date that it allows operations that are no longer available. Here is one of the functions that is giving me problems. Does anyone have any ideas about hou to get access to the LargeInteger? This code is patterned from an MSDN Article "How Long Until My Password Expires?" <BR><BR>Any direction would be greatly appreaciated. <BR><BR>Thanks, <BR><BR>Here is the function. <BR><BR>&#039;************************************ ******************** <BR>&#039; <BR>&#039; GetPasswordPolicy <BR>&#039; <BR>&#039; If Given a Domain, this function will return the <BR>&#039; domains password aging policy as a number of Days. <BR>&#039; <BR>&#039;**************************************** ***************** <BR><BR>Function GetPasswordPolicy(byval searchDomain) <BR><BR>On Error Resume Next <BR><BR> DIM objDomain <BR> DIM objMaxPwdAge <BR> DIM dblMaxPwdNano <BR> DIM dblMaxPwdSecs <BR> DIM dblMaxPwdDays <BR><BR> Set objDomain = GetObject("LDAP://" & searchDomain ) <BR> <BR> set objMaxPwdAge = objDomain.Get("maxPwdAge") &#039; This is where it errors <BR> &#039;set objMaxPwdAge = IADsLargeInteger(objDomain.Get("maxPwdAge")) casting does not work <BR> <BR> Response.Write " maxpwdage err.num is : " & err.number & "description is : " & err.Description & " <BR>" <BR><BR> If objMaxPwdAge.LowPart = 0 Then <BR><BR> &#039;Response.Write "The Maximum Password Age is set to 0 in the " & _ <BR> &#039; "domain. Therefore, the password does not expire. <BR>" <BR> <BR> GetPasswordPolicy = 0 <BR> Else <BR> &#039; convert AD password aging value to a number of days <BR> dblMaxPwdNano = Abs(objMaxPwdAge.HighPart * 2^32 + objMaxPwdAge.LowPart) <BR> dblMaxPwdSecs = dblMaxPwdNano * ONE_HUNDRED_NANOSECOND <BR> dblMaxPwdDays = Int(dblMaxPwdSecs / SECONDS_IN_DAY) <BR> <BR> &#039;Response.Write "Maximum password age is " & dblMaxPwdDays & " days <BR>" <BR> GetPasswordPolicy = dblMaxPwdDays <BR><BR> End If <BR> <BR> set objMaxPwdAge = nothing <BR> set objDomain = nothing <BR> &#039;Response.Write "error number leaving password policy is" & err.number & " <BR>" <BR><BR> <BR> <BR>End Function <BR>