View Issue Details

IDProjectCategoryView StatusLast Update
0032962FPCDatabasepublic2018-02-26 18:22
ReporterKevin MorrisAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformMicrosoft IntelOSWindows Server EssentialsOS Version2016
Product Version3.1.1Product Build56872 
Target Version3.1.1Fixed in Version3.2.0 
Summary0032962: When trying to enter a TBufDataset.IndexName in Design Time, it disappears.
DescriptionYou cannot set the .IndexName property of a TBufDataset at design time. I define indexes in IndexDefs, then I try to enter the name of the index I want the TBufDataset set to in the IndexName property, and it just disappears.
Steps To ReproduceIn Lazarus 1.9 design time, place a TBufDataset on a TDataModule. Define some indexes using IndexDefs. Include field name(s).
Then go back to the TBufDataset and try to set the IndexName property. It disappears, sometimes saying DEFAULT_ORDER.

The only way around this is to set the IndexName in code, so it gets done AFTER a TBufDataset.CreateDataset or TBufDataset.LoadFromFile.

Additional InformationIs it necessary to define indexes in IndexDefs (which contain field names) and then ALSO set the TBufDataset.IndexFieldNames property to the SAME FIELD NAME I just set the the IndexDef that I just defined?

( I could not upload the example project because it is too large )
TagsNo tags attached.
Fixed in Revision38353
FPCOldBugId
FPCTarget
Attached Files

Activities

Michael Van Canneyt

2018-01-12 08:34

administrator   ~0105684

Please try to attach the sample project in various files.
If necessary remove any really large files.
I find it hard to believe that a simple source file can be so big ?

Kevin Morris

2018-01-27 00:08

reporter  

BufDataset_IndexName.zip (130,514 bytes)

Kevin Morris

2018-01-27 00:09

reporter   ~0106059

I found that there were some .exes in the .zip. I deleted them and tried the upload again. It worked this time.

Michael Van Canneyt

2018-02-26 18:22

administrator   ~0106651

This was a tricky one.

Contrary to what one would intuitively think, the indexdefs collection was not the place to add indexes.

New indexes could only be created in code using AddIndex().

I have changed this behaviour so that indexes can now be added to the collection,
and they will be created and maintained when the dataset is opened.

Now you define indexes using the IndexDefs collection, and the active index can be set using IndexName

Issue History

Date Modified Username Field Change
2018-01-06 22:39 Kevin Morris New Issue
2018-01-12 08:32 Michael Van Canneyt Assigned To => Michael Van Canneyt
2018-01-12 08:32 Michael Van Canneyt Status new => assigned
2018-01-12 08:34 Michael Van Canneyt Note Added: 0105684
2018-01-12 08:34 Michael Van Canneyt Status assigned => feedback
2018-01-27 00:08 Kevin Morris File Added: BufDataset_IndexName.zip
2018-01-27 00:09 Kevin Morris Note Added: 0106059
2018-01-27 00:09 Kevin Morris Status feedback => assigned
2018-02-26 18:22 Michael Van Canneyt Fixed in Revision => 38353
2018-02-26 18:22 Michael Van Canneyt Note Added: 0106651
2018-02-26 18:22 Michael Van Canneyt Status assigned => resolved
2018-02-26 18:22 Michael Van Canneyt Fixed in Version => 3.2.0
2018-02-26 18:22 Michael Van Canneyt Resolution open => fixed
2018-02-26 18:22 Michael Van Canneyt Target Version => 3.1.1