Loading ...
Sorry, an error occurred while loading the content.

RE: [ADSI-DirSrv] trouble retrieving large integers from Sun LDAP Server

Expand Messages
  • Carlos Magalhaes
    Hey Bruce Again wonderful information. I will try see if I can dig out some of the C++ code that I remember accessed the LDAP directory directly. If and when I
    Message 1 of 11 , Jun 1, 2003
    • 0 Attachment
      Hey Bruce

      Again wonderful information. I will try see if I can dig out some of the C++
      code that I remember accessed the LDAP directory directly.

      If and when I do find it I will post it here for you.

      Keep us posted how that other LDAP developer gets the integer for you!

      Regards,
      Carlos Magalhaes


      -----Original Message-----
      From: Bruce R. Krasnof [mailto:bruce.krasnof@...]
      Sent: Saturday, May 31, 2003 3:36 PM
      To: ADSIANDDirectoryServices@yahoogroups.com
      Subject: RE: [ADSI-DirSrv] trouble retrieving large integers from Sun LDAP
      Server

      Carlos,

      Good point, I could if I learn C or C++ (I only know Foxpro, VBScript and C#

      right now).

      The ldap engineer at the school where I work is going to store the large
      number
      in a string field for now. There's lots of 'scripters' at the school who
      won't
      want to have to write that low-level code, so the ldap guy is compromising
      for
      now.

      The MS engineer did speak with his boss about it and it sounds like they
      will
      speak to some MS developers about this. So there's a slight chance maybe in

      the future ADSI won't make such a strong assumption when it sees 'INTEGER's.

      thanks,
      Bruce



      Quoting Carlos Magalhaes <CarlosM@...>:

      > Bruce,
      >
      > This is priceless information, thank you for following up and posting
      this.
      >
      > IF ADSI cant get the information you want why don't you use some API calls
      >
      > to get the information from LDAP yourself?
      >
      >
      >
      > -----Original Message-----
      >
      > From: Bruce Krasnof [mailto:bruce.krasnof@...]
      >
      > Sent: Friday, May 30, 2003 11:09 PM
      >
      > To: ADSIANDDirectoryServices@yahoogroups.com
      >
      > Subject: Re: [ADSI-DirSrv] trouble retrieving large integers from Sun LDAP
      >
      > Server
      >
      >
      >
      > Just to followup with this problem I emailed about a week ago, I called MS
      >
      > Product
      >
      > Support and an ldap engineer worked on this for a few hours. It turns out
      to
      >
      > be a
      >
      > limitation of ADSI. 
      >
      >
      >
      > The low level ldap layer that is accessible using C or C++  can see the
      >
      > Int64 number
      >
      > fine, but ADSI assumes that an "Integer" should be converted to an "Int32"
      >
      > since
      >
      > Active Directory sends large integers as a different type (LargeInteger
      ?).
      >
      >
      >
      > After several hours, the MS engineer confirmed there's no way to cast it
      or
      >
      > convert
      >
      > it after ADSI gets a hold of it, by the time ADSI exposes it to VBScript
      or
      >
      > .Net it's
      >
      > too late.
      >
      >
      >
      > So this bug doesn't affect Active Directory, but it does affect the Sun
      One
      >
      > ldap
      >
      > server that is sending this big number as "Integer".  He said this bug may
      >
      > not affect
      >
      > Windows 2000 64 Bit Operating Systems, not sure though.
      >
      >
      >
      > -Bruce
      >
      >
      >
      > brucekrasnof wrote:
      >
      > >
      >
      > > Hi,
      >
      > >
      >
      > > I'm trying to retrieve an ldap attribute (on a Sun One ldap server)
      >
      > > using System.DirectoryServices  that is storing the following string
      >
      > > as an integer in it's schema: 100000001051
      >
      > >
      >
      > > When I retrieve it using c#, the properties value comes back as:
      >
      > > 1215753243
      >
      > >
      >
      > > The property type is "Int32".
      >
      > >
      >
      > > I've tried doing some System.Convert stuff but that hasn't helped.
      >
      > > I'm kind of lost.
      >
      > >
      >
      > > thanks,
      >
      > > Bruce
      >
      > >
      >
      > >                    Yahoo! Groups Sponsor
      >
      > >                        ADVERTISEMENT
      >
      > >                        [Click Here!]
      >
      > >
      >
      > >
      >
      > > To unsubscribe from this group, send an email to:
      >
      > > ADSIANDDirectoryServices-unsubscribe@yahoogroups.com
      >
      > >
      >
      > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      >
      >
      >
      > --
      >
      > Bruce Krasnof
      >
      > Tufts University Computer Services
      >
      > 617-627-4899
      >
      >
      >
      >
      >
      > To unsubscribe from this group, send an email to:
      >
      > ADSIANDDirectoryServices-unsubscribe@yahoogroups.com
      >
      >
      >
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
      >
      >
      >
      >   ----------
      >
      >
      >
      > -------------------------------------------------------------
      >
      > This email and any files transmitted are
      >
      > confidential and intended solely for the
      >
      > use of the individual or entity to which
      >
      > they are addressed, whose privacy
      >
      > should be respected.  Any views or
      >
      > opinions are solely those of the author
      >
      > and do not necessarily represent those
      >
      > of the Trencor Group, or any of its
      >
      > representatives, unless specifically
      >
      > stated. 
      >
      >
      >
      > Email transmission cannot be guaranteed
      >
      > to be secure, error free or without virus
      >
      > contamination.  The sender therefore
      >
      > accepts no liability for any errors or
      >
      > omissions in the contents of this message,
      >
      > nor for any virus infection that might result
      >
      > from opening this message.  Trencor is not
      >
      > responsible in the event of any third party
      >
      > interception of this email.  
      >
      >
      >
      > If you have received this email in error please notify
      >
      > postmaster@...   For more information about
      >
      > Trencor, visit www.trencor.net <http://www.trencor.net>
      >
      >
      >
      >
      >
      >
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      > Yahoo! Groups Sponsor
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      > To unsubscribe from this group, send an email to:
      >
      > ADSIANDDirectoryServices-unsubscribe@yahoogroups.com
      >
      >
      >
      >
      >
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      >
      >
      >
      >
      >





      To unsubscribe from this group, send an email to:
      ADSIANDDirectoryServices-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


      ----------

      -------------------------------------------------------------
      This email and any files transmitted are
      confidential and intended solely for the
      use of the individual or entity to which
      they are addressed, whose privacy
      should be respected. Any views or
      opinions are solely those of the author
      and do not necessarily represent those
      of the Trencor Group, or any of its
      representatives, unless specifically
      stated.

      Email transmission cannot be guaranteed
      to be secure, error free or without virus
      contamination. The sender therefore
      accepts no liability for any errors or
      omissions in the contents of this message,
      nor for any virus infection that might result
      from opening this message. Trencor is not
      responsible in the event of any third party
      interception of this email.

      If you have received this email in error please notify
      postmaster@... For more information about
      Trencor, visit www.trencor.net <http://www.trencor.net>



      [Non-text portions of this message have been removed]
    • Fizzgig
      I m trying to write some SQL Scripts to read/change data in our Active Directory. I m don t seem to be able to access some of the attributes which are marked
      Message 2 of 11 , Nov 10, 2003
      • 0 Attachment
        I'm trying to write some SQL Scripts to read/change data in our Active
        Directory.

        I'm don't seem to be able to access some of the attributes which are
        marked as Large Integers. eg:
        select accountExpires from
        OPENQUERY(ADSI, 'SELECT cn, accountExpires
        FROM ''LDAP://dc=salamis,dc=net''
        WHERE objectClass = ''User'' ')
        Results in:
        Could not convert the data value due to reasons other than sign
        mismatch or overflow.

        I've tried CASTing the value but had no success.

        I found the post below (and very little else online) but it appeared
        to relate to Sun One LDAP, not necessarily AD.

        Do I have the same problem, or is there some work around I can use?

        Cheers,
        Mark.


        --- In ADSIANDDirectoryServices@yahoogroups.com, Bruce Krasnof
        <bruce.krasnof@t...> wrote:
        > Just to followup with this problem I emailed about a week ago, I
        called MS Product
        > Support and an ldap engineer worked on this for a few hours. It
        turns out to be a
        > limitation of ADSI.
        >
        > The low level ldap layer that is accessible using C or C++ can see
        the Int64 number
        > fine, but ADSI assumes that an "Integer" should be converted to an
        "Int32" since
        > Active Directory sends large integers as a different type
        (LargeInteger ?).
        >
        > After several hours, the MS engineer confirmed there's no way to
        cast it or convert
        > it after ADSI gets a hold of it, by the time ADSI exposes it to
        VBScript or .Net it's
        > too late.
        >
        > So this bug doesn't affect Active Directory, but it does affect the
        Sun One ldap
        > server that is sending this big number as "Integer". He said this
        bug may not affect
        > Windows 2000 64 Bit Operating Systems, not sure though.
        >
        > -Bruce
      • Bruce Krasnof
        Mark, I m the guy that posted the bug with iPlanet ldap Large Integers and adsi/.net. I remember the MS directory engineer being confident that the bug was
        Message 3 of 11 , Nov 10, 2003
        • 0 Attachment
          Mark,

          I'm the guy that posted the bug with iPlanet ldap Large Integers and adsi/.net. I remember the MS directory engineer being confident
          that the bug was only because it was a 3rd party ldap server.

          Here's an msdn page that might help:
          http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/netds/large_integer_property_type.asp

          If you end up needing help from Microsoft like I did as for their 'Directory' support group see if you can get this specific guy.
          He was excellent.

          Robert Anderson
          Windows Developer Support - Directory
          Email: robertan@...

          -Bruce


          Fizzgig wrote:

          > I'm trying to write some SQL Scripts to read/change data in our Active
          > Directory.
          >
          > I'm don't seem to be able to access some of the attributes which are
          > marked as Large Integers. eg:
          > select accountExpires from
          > OPENQUERY(ADSI, 'SELECT cn, accountExpires
          > FROM ''LDAP://dc=salamis,dc=net''
          > WHERE objectClass = ''User'' ')
          > Results in:
          > Could not convert the data value due to reasons other than sign
          > mismatch or overflow.
          >
          > I've tried CASTing the value but had no success.
          >
          > I found the post below (and very little else online) but it appeared
          > to relate to Sun One LDAP, not necessarily AD.
          >
          > Do I have the same problem, or is there some work around I can use?
          >
          > Cheers,
          > Mark.
          >
          >
          > --- In ADSIANDDirectoryServices@yahoogroups.com, Bruce Krasnof
          > <bruce.krasnof@t...> wrote:
          > > Just to followup with this problem I emailed about a week ago, I
          > called MS Product
          > > Support and an ldap engineer worked on this for a few hours. It
          > turns out to be a
          > > limitation of ADSI.
          > >
          > > The low level ldap layer that is accessible using C or C++ can see
          > the Int64 number
          > > fine, but ADSI assumes that an "Integer" should be converted to an
          > "Int32" since
          > > Active Directory sends large integers as a different type
          > (LargeInteger ?).
          > >
          > > After several hours, the MS engineer confirmed there's no way to
          > cast it or convert
          > > it after ADSI gets a hold of it, by the time ADSI exposes it to
          > VBScript or .Net it's
          > > too late.
          > >
          > > So this bug doesn't affect Active Directory, but it does affect the
          > Sun One ldap
          > > server that is sending this big number as "Integer". He said this
          > bug may not affect
          > > Windows 2000 64 Bit Operating Systems, not sure though.
          > >
          > > -Bruce
          >
          >
          >
          >
          > *Yahoo! Groups Sponsor*
          > ADVERTISEMENT
          > <http://rd.yahoo.com/M=267637.4116719.5338353.1261774/D=egroupweb/S=1705006764:HM/A=1853618/R=0/SIG=11tr8mk9u/*http://www.netflix.com/Default?mqso=60178338&partid=4116719>
          >
          >
          > To unsubscribe from this group, send an email to:
          > ADSIANDDirectoryServices-unsubscribe@yahoogroups.com
          >
          >
          >
          > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
          > <http://docs.yahoo.com/info/terms/>.
        Your message has been successfully submitted and would be delivered to recipients shortly.