aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/SQL/DefaultRemoteSqlService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/SQL/DefaultRemoteSqlService.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/SQL/DefaultRemoteSqlService.cs23
1 files changed, 3 insertions, 20 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/SQL/DefaultRemoteSqlService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/SQL/DefaultRemoteSqlService.cs
index 986c4d062..e5ac43d3f 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/SQL/DefaultRemoteSqlService.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/SQL/DefaultRemoteSqlService.cs
@@ -27,7 +27,7 @@ namespace Tango.PPC.Common.SQL
{
this.ThrowIfDisabled();
- List<Dictionary<String, Object>> rows = new List<Dictionary<string, object>>();
+ RemoteSqlDataSet dataSet = new RemoteSqlDataSet();
int affected = 0;
using (ObservablesContext db = ObservablesContext.CreateDefault())
@@ -40,30 +40,13 @@ namespace Tango.PPC.Common.SQL
SqlDataReader reader = command.ExecuteReader();
affected = reader.RecordsAffected;
- try
- {
- while (reader.Read())
- {
- Dictionary<String, Object> row = new Dictionary<string, object>();
-
- for (int i = 0; i < reader.FieldCount; i++)
- {
- row[reader.GetName(i)] = reader.GetValue(i);
- }
-
- rows.Add(row);
- }
- }
- finally
- {
- reader.Close();
- }
+ dataSet = await RemoteSqlDataSet.Load(reader);
}
}
await receiver.SendGenericResponse(new ExecuteSqlResponse()
{
- Rows = rows,
+ DataSet = dataSet,
AffectedRecords = affected
}, token);
}