Hey Nash,
For over five years people have been asking us to debug their Active Directory code. So, we developed an Active Directory Web Service: http://www.qdabra.com/en/products/ADWebService.aspx. It's cheap and comes with an hour of support.
If you aren't a developer, I recommend trying our service. It has a lot of features and will save you time.
If you are a developer, you should just debug your code... :) We can't debug every specific line of code that goes into the forum. We are here to help people who have problems with InfoPath. In your case, it's a generic coding quesiton. Because we got so many forum posts that were the same, we developed the Active Directory Web Service.
Sorry I can't be of further assistance.