mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 22:36:17 +02:00
IDEIntf, dbpropedits: check when retrieving fields definitions, issue #27962
git-svn-id: trunk@48889 -
This commit is contained in:
parent
bfe307d647
commit
c6d6f8c7a6
@ -17,9 +17,9 @@ unit DBPropEdits;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, ObjInspStrConsts, PropEdits, PropEditUtils,
|
||||
ComponentEditors,
|
||||
TypInfo, DB, DbCtrls, DBGrids, Forms, DBGridColumnsPropEditForm;
|
||||
Classes, SysUtils, ObjInspStrConsts, Dialogs, PropEdits, PropEditUtils,
|
||||
ComponentEditors, TypInfo, DB, DbCtrls, DBGrids, Forms,
|
||||
DBGridColumnsPropEditForm;
|
||||
|
||||
type
|
||||
TFieldProperty = class(TStringPropertyEditor)
|
||||
@ -78,7 +78,17 @@ begin
|
||||
DataSet.GetFieldNames(List)
|
||||
else
|
||||
begin
|
||||
DataSet.FieldDefs.Update;
|
||||
try
|
||||
DataSet.FieldDefs.Update;
|
||||
except
|
||||
// some FPC versions will fail here, but having persistent fields should
|
||||
// actually work or else present an empty list of fields... but not crash/freeze
|
||||
if Dataset.FieldDefs.Count=0 then begin
|
||||
List.Clear;
|
||||
ShowMessage(dpeUnableToRetrieveFieldsDefinitions);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
for i := 0 to DataSet.FieldDefs.Count - 1 do
|
||||
List.Add(DataSet.FieldDefs[i].Name);
|
||||
end;
|
||||
|
@ -153,6 +153,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr ""
|
||||
|
@ -155,6 +155,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "&Spočítáno"
|
||||
|
@ -156,6 +156,10 @@ msgstr "Dies wird alle Spalten löschen. Fortfahren?"
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr "Dies wird alle Titel aus dem Dataset ersetzen. Fortfahren?"
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "Bere&chnet"
|
||||
|
@ -155,6 +155,10 @@ msgstr "Esto borrará todas las columnas. ¿Desea continuar?"
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr "Esto reemplazará los títulos (captions) de columna actuales por los originales del dataset. ¿Desea continuar?"
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "&Calculados"
|
||||
|
@ -148,6 +148,10 @@ msgstr "Tämä tuhoaa kaikki sarakkeet. Jatka?"
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr "Tämä hakee ja korvaa kaikki otsikot tietokannasta. Jatka?"
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "&Laskettu"
|
||||
|
@ -156,6 +156,10 @@ msgstr "Toutes les colonnes vont être supprimées. Voulez-vous continuer ?"
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr "Toutes les légendes vont être remplacées depuis l'ensemble de données. Voulez-vous continuer ?"
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "&Calculé"
|
||||
@ -1563,3 +1567,4 @@ msgstr "Déplacer l'onglet vers la gauche"
|
||||
#: objinspstrconsts.tccesmovetabright
|
||||
msgid "Move tab right"
|
||||
msgstr "Déplacer l'onglet vers la droite"
|
||||
|
||||
|
@ -152,6 +152,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "מחושב"
|
||||
|
@ -155,6 +155,10 @@ msgstr "Ez a művelet törli az összes oszlopot. Folytatás?"
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr "Ez a művelet lecseréli az összes feliratot az adatkészletben találhatókra. Folytatás?"
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "Számított"
|
||||
|
@ -153,6 +153,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr ""
|
||||
|
@ -156,6 +156,10 @@ msgstr "Verranno cancellate tutte le colonne. Continuare?"
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr "Questo sostituirà tutte le intestazioni dal dataset. Continuare?"
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "&Calcolato"
|
||||
|
@ -153,6 +153,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "計算済み(&C)"
|
||||
|
@ -155,6 +155,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "Ap&skaičiuota"
|
||||
|
@ -148,6 +148,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr ""
|
||||
|
@ -156,6 +156,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr ""
|
||||
|
@ -148,6 +148,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr ""
|
||||
|
@ -154,6 +154,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "&Calculado"
|
||||
|
@ -153,6 +153,10 @@ msgstr "Это действие приведёт к удалению всех с
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr "Это действие приведёт к замене всех заголовков набора данных. Продолжить?"
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "&Вычисляемое"
|
||||
|
@ -155,6 +155,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr ""
|
||||
|
@ -156,6 +156,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr "Об&числено"
|
||||
|
@ -156,6 +156,10 @@ msgstr ""
|
||||
msgid "This will replace all captions from dataset. Continue?"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||
msgid "Unable to retrieve fields definition from dataset"
|
||||
msgstr ""
|
||||
|
||||
#: objinspstrconsts.fescalculated
|
||||
msgid "&Calculated"
|
||||
msgstr ""
|
||||
|
@ -448,6 +448,9 @@ resourcestring
|
||||
// IDE Text Converter
|
||||
itcsSearchAndReplace = 'Search and replace';
|
||||
|
||||
// DBPropedits
|
||||
dpeUnableToRetrieveFieldsDefinitions = 'Unable to retrieve fields definition from dataset';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user