mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 16:59:21 +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
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, ObjInspStrConsts, PropEdits, PropEditUtils,
|
Classes, SysUtils, ObjInspStrConsts, Dialogs, PropEdits, PropEditUtils,
|
||||||
ComponentEditors,
|
ComponentEditors, TypInfo, DB, DbCtrls, DBGrids, Forms,
|
||||||
TypInfo, DB, DbCtrls, DBGrids, Forms, DBGridColumnsPropEditForm;
|
DBGridColumnsPropEditForm;
|
||||||
|
|
||||||
type
|
type
|
||||||
TFieldProperty = class(TStringPropertyEditor)
|
TFieldProperty = class(TStringPropertyEditor)
|
||||||
@ -78,7 +78,17 @@ begin
|
|||||||
DataSet.GetFieldNames(List)
|
DataSet.GetFieldNames(List)
|
||||||
else
|
else
|
||||||
begin
|
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
|
for i := 0 to DataSet.FieldDefs.Count - 1 do
|
||||||
List.Add(DataSet.FieldDefs[i].Name);
|
List.Add(DataSet.FieldDefs[i].Name);
|
||||||
end;
|
end;
|
||||||
|
@ -153,6 +153,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -155,6 +155,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "&Spočítáno"
|
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?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr "Dies wird alle Titel aus dem Dataset ersetzen. Fortfahren?"
|
msgstr "Dies wird alle Titel aus dem Dataset ersetzen. Fortfahren?"
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "Bere&chnet"
|
msgstr "Bere&chnet"
|
||||||
|
@ -155,6 +155,10 @@ msgstr "Esto borrará todas las columnas. ¿Desea continuar?"
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
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?"
|
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
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "&Calculados"
|
msgstr "&Calculados"
|
||||||
|
@ -148,6 +148,10 @@ msgstr "Tämä tuhoaa kaikki sarakkeet. Jatka?"
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr "Tämä hakee ja korvaa kaikki otsikot tietokannasta. Jatka?"
|
msgstr "Tämä hakee ja korvaa kaikki otsikot tietokannasta. Jatka?"
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "&Laskettu"
|
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?"
|
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 ?"
|
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
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "&Calculé"
|
msgstr "&Calculé"
|
||||||
@ -1563,3 +1567,4 @@ msgstr "Déplacer l'onglet vers la gauche"
|
|||||||
#: objinspstrconsts.tccesmovetabright
|
#: objinspstrconsts.tccesmovetabright
|
||||||
msgid "Move tab right"
|
msgid "Move tab right"
|
||||||
msgstr "Déplacer l'onglet vers la droite"
|
msgstr "Déplacer l'onglet vers la droite"
|
||||||
|
|
||||||
|
@ -152,6 +152,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "מחושב"
|
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?"
|
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?"
|
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
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "Számított"
|
msgstr "Számított"
|
||||||
|
@ -153,6 +153,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -156,6 +156,10 @@ msgstr "Verranno cancellate tutte le colonne. Continuare?"
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr "Questo sostituirà tutte le intestazioni dal dataset. Continuare?"
|
msgstr "Questo sostituirà tutte le intestazioni dal dataset. Continuare?"
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "&Calcolato"
|
msgstr "&Calcolato"
|
||||||
|
@ -153,6 +153,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "計算済み(&C)"
|
msgstr "計算済み(&C)"
|
||||||
|
@ -155,6 +155,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "Ap&skaičiuota"
|
msgstr "Ap&skaičiuota"
|
||||||
|
@ -148,6 +148,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -156,6 +156,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -148,6 +148,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -154,6 +154,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "&Calculado"
|
msgstr "&Calculado"
|
||||||
|
@ -153,6 +153,10 @@ msgstr "Это действие приведёт к удалению всех с
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr "Это действие приведёт к замене всех заголовков набора данных. Продолжить?"
|
msgstr "Это действие приведёт к замене всех заголовков набора данных. Продолжить?"
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "&Вычисляемое"
|
msgstr "&Вычисляемое"
|
||||||
|
@ -155,6 +155,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -156,6 +156,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr "Об&числено"
|
msgstr "Об&числено"
|
||||||
|
@ -156,6 +156,10 @@ msgstr ""
|
|||||||
msgid "This will replace all captions from dataset. Continue?"
|
msgid "This will replace all captions from dataset. Continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: objinspstrconsts.dpeunabletoretrievefieldsdefinitions
|
||||||
|
msgid "Unable to retrieve fields definition from dataset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: objinspstrconsts.fescalculated
|
#: objinspstrconsts.fescalculated
|
||||||
msgid "&Calculated"
|
msgid "&Calculated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -448,6 +448,9 @@ resourcestring
|
|||||||
// IDE Text Converter
|
// IDE Text Converter
|
||||||
itcsSearchAndReplace = 'Search and replace';
|
itcsSearchAndReplace = 'Search and replace';
|
||||||
|
|
||||||
|
// DBPropedits
|
||||||
|
dpeUnableToRetrieveFieldsDefinitions = 'Unable to retrieve fields definition from dataset';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user