Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Imports System.Security Module Module1 Sub Main() Dim conConnection As New ADODB.Connection Dim cmdCommand As New ADODB.Command Dim rstRecordSet As New ADODB.Recordset conConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=\\SERVER\DATABASE.mdb;Mode=Read|Write" conConnection.CursorLocation = ADODB.CursorLocationEnum.adUseClient conConnection.Open() With cmdCommand .ActiveConnection = conConnection .CommandText = "SELECT * FROM TABLE;" .CommandType = ADODB.CommandTypeEnum.adCmdText End With With rstRecordSet .CursorType = ADODB.CursorTypeEnum.adOpenStatic .CursorLocation = ADODB.CursorLocationEnum.adUseClient .LockType = ADODB.LockTypeEnum.adLockOptimistic .Open(cmdCommand) End With If rstRecordSet.RecordCount <> 0 Then rstRecordSet.MoveFirst() Dim file As String file = "C:\robocopy.exe" Dim args As String args = "\\mje-imtmifile02\500div\Job_Files\5XXXXXXX-Template-New-Folders " & rstRecordSet.Fields(0).Value & " *.* /copyall /mir" Stop Dim username As String username = "USER" Dim pass As SecureString pass = Secure() Dim Dom As String Dom = "DOMAIN" Process.Start(file, args, username, pass, Dom) Else Exit Sub End If End Sub Public Function Start(fileName As String, arguments As String, userName As String, password As SecureString, domain As String) As Process End Function Public Function Secure() As SecureString Dim pass As String pass = "PASSWORD" Dim str As New SecureString For x As Integer = 0 To pass.Length - 1 str.AppendChar(pass.Substring(x, 1)) Next Return str End Function End Module
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.