PRTG Temperaturen der Serverräume jetzt per SQL anpassbar
This commit is contained in:
@@ -178,6 +178,18 @@ Public Class cSQL
|
||||
con.Close()
|
||||
End Sub
|
||||
|
||||
Public Shared Function sql_simple_request(db As String, table As String, WO As String) As String
|
||||
Dim ds As New DataSet
|
||||
Dim Antwort As String
|
||||
cSQL.SQL2DS($"SELECT Parameter FROM [{db}].[dbo].[{table}] WHERE Name = '{WO}'", ds)
|
||||
If ds.Tables(0).Rows.Count > 0 Then
|
||||
Antwort = ds.Tables(0).Rows(0).Item(0).ToString
|
||||
Return Antwort
|
||||
End If
|
||||
|
||||
ds.Clear()
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user