View Issue Details

IDProjectCategoryView StatusLast Update
0002326JEDI VCL00 JVCL Componentspublic2006-04-14 07:55
ReporternestorAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 BETA 2 
Target VersionFixed in Version3.30 
Summary0002326: TJvDBIndexCombo and descending index
DescriptionTJvDBIndexCombo raize exception when a descending index (Paradox) is selected. To avoid this I suggest this fix:
Additional Informationfunction TJvDBIndexCombo.GetIndexFieldName(var AName: string): Boolean;
begin
  Result := True;
  if ItemIndex >= 0 then
  begin
    if EnableNoIndex and (Items[ItemIndex] = NoIndexItem) then
      AName := ''
    else
    with TIndexDef(Items.Objects[ItemIndex]) do
    begin
      AName := Fields;
      if (AName = '') or (ixDescending in Options) then
      begin
        AName := Name;
        Result := False;
      end;
    end;
  end
  else
    AName := '';
end;
TagsNo tags attached.

Activities

nestor

2005-10-26 20:02

reporter   ~0008060

Also, I suggest to use NoIndexItem to rename the primary paradox index (who has no name) in the index combo list

I upload the modification patch.

Regards

2005-10-26 20:03

 

JvBDEIndex.pas.txt (1,091 bytes)
Index: JVCL3/run/JvBDEIndex.pas
===================================================================
RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvBDEIndex.pas,v
retrieving revision 1.15
diff -u -r1.15 JvBDEIndex.pas
--- JVCL3/run/JvBDEIndex.pas	17 Feb 2005 10:19:59 -0000	1.15
+++ JVCL3/run/JvBDEIndex.pas	27 Oct 2005 02:02:04 -0000
@@ -283,7 +283,8 @@
     else
     begin
       AName := TIndexDef(Items.Objects[ItemIndex]).Fields;
-      if AName = '' then
+      if (AName = '') or
+         (ixDescending in TIndexDef(Items.Objects[ItemIndex]).Options)  then
       begin
         AName := TIndexDef(Items.Objects[ItemIndex]).Name;
         Result := False;
@@ -312,7 +313,10 @@
           if not (ixExpression in Options) then
           begin
             if FDisplayMode = dmIndexName then
-              AFld := Name
+ 	      if (Name = '') and (EnableNoIndex) then //(TableType = ttparadox) and (ixprimaty in Options) 
+    		AFLd := NoIndexItem
+             else
+               AFld := Name
             else
             begin
               AFld := '';
JvBDEIndex.pas.txt (1,091 bytes)

obones

2006-04-04 05:06

administrator   ~0008865

I'm not quite sure as to what is done here.
Could you do the following?
1. Test against the latest version of the JVCL
2. If the bug is still there, create a sample application showing it
3. Zip up the sources and post it here.

Thanks in advance.

2006-04-04 12:37

 

JvBDEIndexProject.zip (7,767 bytes)

nestor

2006-04-04 12:39

reporter   ~0008919

I do the test with last CVS. The bugs are still there.
JvBDEIndexProject shows the bugs. Also, it contains the fixed unit of JvBDEIndex.

Regards

obones

2006-04-14 07:55

administrator   ~0009118

Thanks, this is now in CVS.

Issue History

Date Modified Username Field Change
2004-11-21 11:08 nestor New Issue
2005-10-26 20:02 nestor Note Added: 0008060
2005-10-26 20:03 nestor File Added: JvBDEIndex.pas.txt
2006-04-04 05:06 obones Note Added: 0008865
2006-04-04 05:06 obones Status new => feedback
2006-04-04 12:37 nestor File Added: JvBDEIndexProject.zip
2006-04-04 12:39 nestor Note Added: 0008919
2006-04-14 07:55 obones Status feedback => resolved
2006-04-14 07:55 obones Resolution open => fixed
2006-04-14 07:55 obones Assigned To => obones
2006-04-14 07:55 obones Note Added: 0009118