Bugfixes
This commit is contained in:
@@ -619,4 +619,50 @@ Public Class Class1
|
||||
con.Close()
|
||||
End Function
|
||||
|
||||
Public Shared Function GetUserPasswort(ip As String, ByRef User As String, ByRef Password As String)
|
||||
Dim tmp As New AutoCompleteStringCollection()
|
||||
Dim con As New SqlConnection
|
||||
Dim cmd As New SqlCommand
|
||||
Dim reader As SqlDataReader
|
||||
con.ConnectionString = Class1.DBConString
|
||||
cmd.Connection = con
|
||||
|
||||
con.Open()
|
||||
cmd.CommandText = "SELECT Benutzer, Passwort FROM TbL_Netzwerkclients WHERE IPAdresse = '" & ip & "' "
|
||||
reader = cmd.ExecuteReader()
|
||||
Do While reader.Read
|
||||
User = ReadNullAsEmptyString(reader, "Benutzer")
|
||||
Password = ReadNullAsEmptyString(reader, "Passwort")
|
||||
Loop
|
||||
con.Close()
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function MainHost(ip As String)
|
||||
Dim tmp As New AutoCompleteStringCollection()
|
||||
Dim con As New SqlConnection
|
||||
Dim cmd As New SqlCommand
|
||||
Dim reader As SqlDataReader
|
||||
con.ConnectionString = Class1.DBConString
|
||||
cmd.Connection = con
|
||||
|
||||
Dim LinkedWith As String
|
||||
|
||||
con.Open()
|
||||
cmd.CommandText = "SELECT LinkedWith FROM TbL_Netzwerkclients WHERE IPAdresse = '" & ip & "' "
|
||||
reader = cmd.ExecuteReader()
|
||||
Do While reader.Read
|
||||
LinkedWith = ReadNullAsEmptyString(reader, "LinkedWith")
|
||||
Loop
|
||||
con.Close()
|
||||
|
||||
If LinkedWith = "" Then
|
||||
Return ip
|
||||
Else
|
||||
Return LinkedWith
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user