IDEIntf: improved error messages when it is not possible to get the database fields list, issue 39304

This commit is contained in:
Maxim Ganetsky 2021-08-03 01:20:03 +03:00
parent bac636c1f0
commit 9c82bde7c3
3 changed files with 6 additions and 5 deletions

View File

@ -189,7 +189,7 @@ begin
FieldsList := TFieldsListFrm.Create(Self, LinkDataset, Designer); FieldsList := TFieldsListFrm.Create(Self, LinkDataset, Designer);
except except
on E:Exception do begin on E:Exception do begin
ShowMessage(fesNoFields+^M+fesCheckDSet+^M^M+E.Message); MessageDlg(fesNoFields+^M+fesCheckDSet+^M^M+Format(fesErrorMessage, [E.Message]), mtError, [mbOK], 0);
exit; exit;
end; end;
end; end;

View File

@ -431,7 +431,7 @@ begin
end; end;
except except
on E:Exception do begin on E:Exception do begin
ShowMessage(fesNoFields+^M+fesCheckDSet+^M^M+E.Message); MessageDlg(fesNoFields+^M+fesCheckDSet+^M^M+Format(fesErrorMessage, [E.Message]), mtError, [mbOK], 0);
end; end;
end; end;
end; end;

View File

@ -401,10 +401,11 @@ resourcestring
fesFeTitle = 'Edit Fields ...'; fesFeTitle = 'Edit Fields ...';
oisAddFields = '&Add fields'; oisAddFields = '&Add fields';
oisAddFieldsFromFieldDefs = 'Add fields from FieldDefs'; oisAddFieldsFromFieldDefs = 'Add fields from FieldDefs';
fesNoFields = 'It was not possible to get the dataset field''s list'; fesNoFields = 'It was not possible to get the dataset fields list.';
fesCheckDset = 'Check dataset settings'; fesCheckDset = 'Check dataset settings.';
fesErrorMessage = 'Error message:' + LineEnding + '%s';
fesFlTitle = 'FieldDefs'; fesFlTitle = 'FieldDefs';
fesNoFieldsNote = 'Field''s list is not available, can''t check for duplicates'; fesNoFieldsNote = 'Fields list is not available, can''t check for duplicates.';
oisIncompatibleIdentifier = 'Incompatible Identifier'; oisIncompatibleIdentifier = 'Incompatible Identifier';
oisIsNotAValidMethodName = '"%s" is not a valid method name.'; oisIsNotAValidMethodName = '"%s" is not a valid method name.';
oisTheIdentifierIsNotAMethodPressCancelToUndoPressIgn = 'The identifier "%s" is not a method.' oisTheIdentifierIsNotAMethodPressCancelToUndoPressIgn = 'The identifier "%s" is not a method.'