Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!
'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
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.