I am getting a weird error when attempting to call various modules in my application. I desperatly need help with this as I am unsure how to fix it.
The following is the code I am using to call these different mods:
The following is the screenshot of the error I get when attempting to load the modPAS.PAS_Reset mod (selected index of 5 - 7). The funny part of this is that the code seems to be trying to use a sql connection that is defines under the GASPCardio_Reset mod (selected index of 2 - 4). To prove my point, the PAS reset code is posted below the screenshot of the error message.
![Name: Error.PNG
Views: 83
Size: 70.4 KB]()
Code of the PAS_Reset mod:
The following is the code I am using to call these different mods:
Code:
Private Sub btnChange_Click(sender As Object, e As EventArgs) Handles btnChange.Click
If cApplication.SelectedIndex = 0 Then
modAD.AD_Reset()
ElseIf cApplication.SelectedIndex = 1 Then
modOI.OI_Reset()
ElseIf cApplication.SelectedIndex = 2 Or 3 Or 4 Then
modGASP.GASPCardio_Reset()
ElseIf cApplication.SelectedIndex = 5 Or 6 Or 7 Then
modPAS.PAS_Reset()
ElseIf cApplication.SelectedIndex = 8 Then
modLEO.LEO_Reset()
Code of the PAS_Reset mod:
Code:
Dim Server As String
If frmPasswordResets.cApplication.SelectedIndex = 5 Then
Server = "testServ"
ElseIf frmPasswordResets.cApplication.SelectedIndex = 6 Then
Server = "testServ"
ElseIf frmPasswordResets.cApplication.SelectedIndex = 7 Then
Server = "testServ"
End If
'Execute First Command
Dim a As New ProcessStartInfo(vbHide)
a.FileName = "\\isis\AppFiles\plink.exe"
a.Arguments = "plink " & Server & "-l testUser sudo /usr/sbin/userdbset -d -u " & frmPasswordResets.txtUsername.Text & " login_time"
a.WindowStyle = ProcessWindowStyle.Hidden
Process.Start(a)