Advertisement
Advertisement
| 06.11.2008 at 05:10PM PDT, ID: 23477911 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: |
'If there is still an available Host record and the Host is disabled in AD, lets disable it on the database if not already.
ElseIf IsDBNull(objRecordSet.Fields("distinguishedName").Value) = False And IsDBNull(objRecordSet.Fields("description").Value) = False Then
While Not objRecordSet.EOF
Dim objAccount As ADODB.Recordset = GetObject("LDAP://" & objRecordSet.Fields("distinguishedName").Value)
If objAccount.AccountDisabled Then
' Connect to DB and set the Status field to "Disabled" and
' the Flag(soon to be DaysOffline) field to 29 days.
Dim sqlCon As New SqlClient.SqlConnection
Dim sqlCom As New SqlClient.SqlCommand
sqlCon.ConnectionString = My.Settings.ConnectionString
Try
|