Advertisement

05.14.2008 at 08:23PM PDT, ID: 23403906
[x]
Attachment Details

VB.Net - Trying to pull in a specific AD Field value, i.e. value = 'DISBL'

Asked by wally_davis in Microsoft Visual Basic.Net

Tags: VB.NET, IE 7.0

I'm using a RecordSet to pull a specific value from the "Description" Field that will eqaul "DISBL".

I tried setting my last line of code (see Code below) originally to pass in a value like this:
ElseIf IsDBNull(objRecordSet.Fields("description").value) = False Then
                strResult = objRecordSet.Fields("description").value = "DISBL'

And received an error that said unable to Convert value to Boolean or something like that. Not at work where I can run it right now. But, I'm hoping someone has been down the primrose path and could tell me how I could possibly pass the "DISBL" Value in. We have other "Description" values in AD so I need to hone in on this specific value.
Thank you for your help Experts,
WDStart Free Trial
1:
2:
3:
4:
5:
objCommand.CommandText = String.Format("Select dnshostname, description, ADsPath FROM 'LDAP:{0}' Where objectClass = 'computer' AND cn='{1}'", ldapPath, host)
objRecordSet = objCommand.Execute()
 
ElseIf IsDBNull(objRecordSet.Fields("description").value) = False Then
                strResult = objRecordSet.Fields("description").value
[+][-]05.14.2008 at 11:35PM PDT, ID: 21571068

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 08:07AM PDT, ID: 21574450

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 10:19AM PDT, ID: 21576025

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 01:04AM PDT, ID: 21604226

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 01:28PM PDT, ID: 21610047

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Tags: VB.NET, IE 7.0
Sign Up Now!
Solution Provided By: wally_davis
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628