View Issue Details

IDProjectCategoryView StatusLast Update
0026492LazarusIDEpublic2015-03-05 05:09
ReporterTony WhymanAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformamd64OSlinuxOS Version3.2.0-61-generic
Product Version1.2.4Product Build 
Target Version1.4Fixed in Version1.5 (SVN) 
Summary0026492: Fieldname list empty in (e.g.) a TColumn if the datasource.dataset is not or has not been active
DescriptionUnlike the Columns Editor, the TFieldProperty editor does not update the dataset's fieldDefs before accessing them. If the dataset has never been activated then the probability is that the FieldDefs are empty and need to be updated

a call to DataSet.FieldDefs.Update; needs to be added to procedure LoadDataSourceFields.

See attached patch
TagsNo tags attached.
Fixed in Revision48139
LazTarget1.4
WidgetsetGTK 2
Attached Files
  • dbprop.patch (418 bytes)
    --- lazarus/components/ideintf/dbpropedits.pas	2014-07-16 15:46:19.233547001 +0100
    +++ /home/tony/lazarus/1.2.4/components/ideintf/dbpropedits.pas	2013-09-28 12:41:48.000000000 +0100
    @@ -68,7 +68,6 @@ begin
             DataSet.GetFieldNames(List)
           else
           begin
    -        DataSet.FieldDefs.Update;
             for i := 0 to DataSet.FieldDefs.Count - 1 do
               List.Add(DataSet.FieldDefs[i].Name);
           end;
    
    dbprop.patch (418 bytes)
  • dbprop2.patch (418 bytes)
    --- /home/tony/lazarus/1.2.4/components/ideintf/dbpropedits.pas	2013-09-28 12:41:48.000000000 +0100
    +++ lazarus/components/ideintf/dbpropedits.pas	2014-07-16 15:46:19.233547001 +0100
    @@ -68,6 +68,7 @@ begin
             DataSet.GetFieldNames(List)
           else
           begin
    +        DataSet.FieldDefs.Update;
             for i := 0 to DataSet.FieldDefs.Count - 1 do
               List.Add(DataSet.FieldDefs[i].Name);
           end;
    
    dbprop2.patch (418 bytes)

Activities

Tony Whyman

2014-07-16 16:56

reporter  

dbprop.patch (418 bytes)
--- lazarus/components/ideintf/dbpropedits.pas	2014-07-16 15:46:19.233547001 +0100
+++ /home/tony/lazarus/1.2.4/components/ideintf/dbpropedits.pas	2013-09-28 12:41:48.000000000 +0100
@@ -68,7 +68,6 @@ begin
         DataSet.GetFieldNames(List)
       else
       begin
-        DataSet.FieldDefs.Update;
         for i := 0 to DataSet.FieldDefs.Count - 1 do
           List.Add(DataSet.FieldDefs[i].Name);
       end;
dbprop.patch (418 bytes)

Tony Whyman

2014-07-16 17:00

reporter  

dbprop2.patch (418 bytes)
--- /home/tony/lazarus/1.2.4/components/ideintf/dbpropedits.pas	2013-09-28 12:41:48.000000000 +0100
+++ lazarus/components/ideintf/dbpropedits.pas	2014-07-16 15:46:19.233547001 +0100
@@ -68,6 +68,7 @@ begin
         DataSet.GetFieldNames(List)
       else
       begin
+        DataSet.FieldDefs.Update;
         for i := 0 to DataSet.FieldDefs.Count - 1 do
           List.Add(DataSet.FieldDefs[i].Name);
       end;
dbprop2.patch (418 bytes)

Tony Whyman

2014-07-16 17:00

reporter   ~0076243

oops patch was wrong way round. dbprop2.patch is the correct version

Jesus Reyes

2015-03-05 05:09

developer   ~0081648

Applied, thanks.

Issue History

Date Modified Username Field Change
2014-07-16 16:56 Tony Whyman New Issue
2014-07-16 16:56 Tony Whyman File Added: dbprop.patch
2014-07-16 17:00 Tony Whyman File Added: dbprop2.patch
2014-07-16 17:00 Tony Whyman Note Added: 0076243
2015-03-05 05:08 Jesus Reyes Assigned To => Jesus Reyes
2015-03-05 05:08 Jesus Reyes Status new => assigned
2015-03-05 05:09 Jesus Reyes Fixed in Revision => 48139
2015-03-05 05:09 Jesus Reyes LazTarget => 1.4
2015-03-05 05:09 Jesus Reyes Note Added: 0081648
2015-03-05 05:09 Jesus Reyes Status assigned => resolved
2015-03-05 05:09 Jesus Reyes Fixed in Version => 1.5 (SVN)
2015-03-05 05:09 Jesus Reyes Resolution open => fixed
2015-03-05 05:09 Jesus Reyes Target Version => 1.4