Hi Michel,
Thanks, I was not aware this was causing a problem. Given what you have found, it is probably best not to use the DBPortal.GetTableFromDataReader method, I changed my code like this:
DataTable dt = new DataTable();
dt.Columns.Add("ModuleID", typeof(int));
dt.Columns.Add("ModuleGuid", typeof(string));
dt.Columns.Add("SettingName", typeof(string));
dt.Columns.Add("SettingValue", typeof(string));
dt.Columns.Add("ControlType", typeof(string));
dt.Columns.Add("ControlSrc", typeof(string));
dt.Columns.Add("HelpKey", typeof(string));
dt.Columns.Add("SortOrder", typeof(int));
dt.Columns.Add("RegexValidationExpression", typeof(string));
using (IDataReader reader = SqliteHelper.ExecuteReader(
GetConnectionString(),
sqlCommand.ToString(),
arParams))
{
while (reader.Read())
{
DataRow row = dt.NewRow();
row["ModuleID"] = reader["ModuleID"];
row["ModuleGuid"] = reader["ModuleGuid"];
row["SettingName"] = reader["SettingName"];
row["SettingValue"] = reader["SettingValue"];
row["ControlType"] = reader["ControlType"];
row["ControlSrc"] = reader["ControlSrc"];
row["HelpKey"] = reader["HelpKey"];
row["SortOrder"] = reader["SortOrder"];
row["RegexValidationExpression"] = reader["RegexValidationExpression"];
dt.Rows.Add(row);
}
}
return dt;
Best,
Joe