From 373429346eb2368304c5d8d4bb8d622f2a0b9936 Mon Sep 17 00:00:00 2001 From: collins-self Date: Tue, 17 Dec 2024 15:19:23 -0500 Subject: [PATCH] OutputStreamDeviceDigital --- .../UI/DataModels/OutputStreamDeviceDigital.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Libraries/GSF.PhasorProtocols/UI/DataModels/OutputStreamDeviceDigital.cs b/Source/Libraries/GSF.PhasorProtocols/UI/DataModels/OutputStreamDeviceDigital.cs index 632a1798d7..110597c2dd 100755 --- a/Source/Libraries/GSF.PhasorProtocols/UI/DataModels/OutputStreamDeviceDigital.cs +++ b/Source/Libraries/GSF.PhasorProtocols/UI/DataModels/OutputStreamDeviceDigital.cs @@ -232,7 +232,7 @@ public static IList LoadKeys(AdoDataConnection database, int outputStreamDe if (!string.IsNullOrEmpty(sortMember)) sortClause = $"ORDER BY {sortMember} {sortDirection}"; - DataTable outputStreamDeviceDigitalTable = database.Connection.RetrieveData(database.AdapterType, $"SELECT ID From OutputStreamDeviceDigital WHERE OutputStreamDeviceID = {outputStreamDeviceID} {sortClause}"); + DataTable outputStreamDeviceDigitalTable = database.Connection.RetrieveData(database.AdapterType, "SELECT ID From OutputStreamDeviceDigital WHERE OutputStreamDeviceID = {0} {1}", outputStreamDeviceID, sortClause); foreach (DataRow row in outputStreamDeviceDigitalTable.Rows) { @@ -272,9 +272,10 @@ public static ObservableCollection Load(AdoDataConnec if (keys is not null && keys.Count > 0) { commaSeparatedKeys = keys.Select(key => $"{key}").Aggregate((str1, str2) => $"{str1},{str2}"); - query = database.ParameterizedQueryString($"SELECT NodeID, OutputStreamDeviceID, ID, Label, MaskValue, LoadOrder FROM OutputStreamDeviceDigital WHERE ID IN ({commaSeparatedKeys})"); - outputStreamDeviceDigitalTable = database.Connection.RetrieveData(database.AdapterType, query, DefaultTimeout); + outputStreamDeviceDigitalTable = database.Connection.RetrieveData(database.AdapterType, + "SELECT NodeID, OutputStreamDeviceID, ID, Label, MaskValue, LoadOrder FROM OutputStreamDeviceDigital " + + "WHERE ID IN ({0})", DefaultTimeout, commaSeparatedKeys); outputStreamDeviceDigitalList = new OutputStreamDeviceDigital[outputStreamDeviceDigitalTable.Rows.Count]; foreach (DataRow row in outputStreamDeviceDigitalTable.Rows)