Permalink
Browse files

GSF.PhasorProtocols.UI: Fixed foreign key constraint that occurs in S…

…QLite when modifying output stream device phasors.
  • Loading branch information...
StephenCWills committed Nov 10, 2017
1 parent 8d45903 commit 93d6a348dbe421433e09359fc8a802df4e678f2b
Showing with 3 additions and 4 deletions.
  1. +3 −4 Source/Libraries/GSF.PhasorProtocols/UI/DataModels/OutputStreamDevicePhasor.cs
@@ -465,11 +465,10 @@ public static string Save(AdoDataConnection database, OutputStreamDevicePhasor o
}
else
{
query = database.ParameterizedQueryString("UPDATE OutputStreamDevicePhasor SET NodeID = {0}, OutputStreamDeviceID = {1}, Label = {2}, Type = {3}, " +
"Phase = {4}, ScalingValue = {5}, LoadOrder = {6}, UpdatedBy = {7}, UpdatedOn = {8} WHERE ID = {9}", "nodeID", "outputStreamDeviceID", "label",
"type", "phase", "scalingValue", "loadOrder", "updatedBy", "updatedOn", "id");
query = "UPDATE OutputStreamDevicePhasor SET NodeID = {0}, OutputStreamDeviceID = {1}, Label = {2}, Type = {3}, " +
"Phase = {4}, ScalingValue = {5}, LoadOrder = {6}, UpdatedBy = {7}, UpdatedOn = {8} WHERE ID = {9}";
database.Connection.ExecuteNonQuery(query, DefaultTimeout, outputStreamDevicePhasor.NodeID, outputStreamDevicePhasor.OutputStreamDeviceID,
database.ExecuteNonQuery(DefaultTimeout, query, outputStreamDevicePhasor.NodeID, outputStreamDevicePhasor.OutputStreamDeviceID,
outputStreamDevicePhasor.Label, outputStreamDevicePhasor.Type, outputStreamDevicePhasor.Phase, outputStreamDevicePhasor.ScalingValue,
outputStreamDevicePhasor.LoadOrder, CommonFunctions.CurrentUser, database.UtcNow, outputStreamDevicePhasor.ID);

0 comments on commit 93d6a34

Please sign in to comment.