View Issue Details

IDProjectCategoryView StatusLast Update
0030931LazarusLCLpublic2017-05-17 16:37
ReporterLuca Olivetti Assigned ToMattias Gaertner  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.6.2 
Summary0030931: TDbLookupCombobox doesn't work with TFixedFormatDataset/TSdfDataset with fpc 2.6.4
DescriptionA TDbLookupCombobox shows blank items when used with a TSdfDataset, just like bug 0026356
It worked in lazarus 1.4.4.
I see in lcl/include/dblookup.inc that there's a workaround for TMemDataset:

"in fpc 2.6.4, TMemDataset does not supports BlockRead. Issues 26356, 27959"

It appears that TSdfDataset has the same issue (though I don't understand why it worked with lazarus 1.4.4), fixed in fpc 3.0.0.

The attached patch fixes the problem.
TagsNo tags attached.
Fixed in Revision54950
LazTarget-
Widgetset
Attached Files

Activities

Luca Olivetti

2016-11-15 19:41

reporter  

dblookup.patch (659 bytes)   
Index: lcl/include/dblookup.inc
===================================================================
--- lcl/include/dblookup.inc	(revision 53370)
+++ lcl/include/dblookup.inc	(working copy)
@@ -274,7 +274,7 @@
   Bookmark := ListLinkDataSet.GetBookmark;
   //in fpc 2.6.4, TMemDataset does not supports BlockRead. Issues 26356, 27959
   {$IF FPC_FULLVERSION < 30000}
-  DatasetSupportsBlockRead := not IsClass(ListLinkDataSet, 'TMemDataset');
+  DatasetSupportsBlockRead := not IsClass(ListLinkDataSet, 'TMemDataset') and not IsClass(ListLinkDataSet, 'TFixedFormatDataSet');
   if DatasetSupportsBlockRead then
     ListLinkDataSet.BlockReadSize := 1
   else
dblookup.patch (659 bytes)   

LacaK

2016-11-15 19:55

developer   ~0095892

BlockRead support for TSDFDataSet was added in rev.30736 (for TMemDataSet in rev.28003)

Luca Olivetti

2016-11-15 19:59

reporter  

bugdblookup.tar.gz (2,325 bytes)

Luca Olivetti

2016-11-15 20:00

reporter   ~0095893

I also attached a simple project to reproduce the issue.

Luca Olivetti

2017-03-06 09:05

reporter   ~0098678

I see that this patch didn't make it neither to trunk nor to 1.6.4.
Please consider it for inclusion in both branches.

Mattias Gaertner

2017-05-17 16:37

manager   ~0100364

Thanks!

Issue History

Date Modified Username Field Change
2016-11-15 19:41 Luca Olivetti New Issue
2016-11-15 19:41 Luca Olivetti File Added: dblookup.patch
2016-11-15 19:55 LacaK Note Added: 0095892
2016-11-15 19:59 Luca Olivetti File Added: bugdblookup.tar.gz
2016-11-15 20:00 Luca Olivetti Note Added: 0095893
2017-03-06 09:05 Luca Olivetti Note Added: 0098678
2017-05-17 16:37 Mattias Gaertner Fixed in Revision => 54950
2017-05-17 16:37 Mattias Gaertner LazTarget => -
2017-05-17 16:37 Mattias Gaertner Note Added: 0100364
2017-05-17 16:37 Mattias Gaertner Status new => resolved
2017-05-17 16:37 Mattias Gaertner Resolution open => fixed
2017-05-17 16:37 Mattias Gaertner Assigned To => Mattias Gaertner