hi all,

I get an error message as "Invalid use of Null' when i try to retreive an attribute value from LDAP.

I could not find the reasons for this...
I find this error message when i try to retreive some specific attributes like first name ,last name in LDAP. Also i want to tel that i am successful in retreiving other attribute values.

What could be the reason for this.

Pls help me in sorting out this.

It means the data you are pulling is blank.

Mayeb connection is not really being made?

Maybe your criteria is not being met?

In either case you are not getting any results back therfore it is an invalid use of null.

Set break points... and set up msgbox's

Like ..


msgbox "Got Here"
more code
msgbox "got here"

And all along the way display the variables.

commented: Nice Response +1

I like to debug with msgbox's, it stops the program at the point, and displays information too (such as the values contained within a variable). So, Whenever it is you are trying to read from the LDAP connection, stick a msgbox on it to very the contents being read in. Also, how are you going about connecting to, and reading fromt he LDAP connection? I'm guessing with Objects, but if you post the code, we can look through it.

It shouldn't give you an error retreiving the information. The error is probably the location you are putting it in, possibly msflexgrid.
try this (if you are using msflexgrid)

grid.textmatrix(0,0) = rs.fields(0).value & ""

That way you are not applying a null value to a field.

Let's not assume, but I'll do what I can if you post the code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.