|
@@ -947,7 +947,14 @@ namespace PRSDesktop
|
|
|
{
|
|
|
var code = variable.Code.Replace("/", " ");
|
|
|
QuestionCodes[code] = Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(code.ToLower());
|
|
|
- data.Columns.Add(code, typeof(string));
|
|
|
+ try
|
|
|
+ {
|
|
|
+ data.Columns.Add(code, typeof(string));
|
|
|
+ }
|
|
|
+ catch(DuplicateNameException e)
|
|
|
+ {
|
|
|
+ MessageBox.Show($"Error: duplicate variable code {code}");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else if (questions.Any())
|