Lookup field BUG (Zeos REV 240)

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
User avatar
cipto_kh
Senior Boarder
Senior Boarder
Posts: 83
Joined: 28.09.2005, 11:22
Location: Indonesia
Contact:

Lookup field BUG (Zeos REV 240)

Post by cipto_kh »

Hi all,

I'm using Delphi 7 with Firebird 2.0.1, InfoPower 4000.T.B, ZeosDBO 6.6.2-BETA (REV 240).

Pre-Condition:
1. wwNavigator with nbsSearchDialog button
2. TZConenction and TZQuery
3. Only 1 user using this program

There is a bug if we create 1 lookup field on TZQuery (maybe TZTable also has this error too). Here is the step:
1. I click the nbsSearchDialog button to move to record 2
2. then I click again the nbsSearchDialog button and the bug is happen. The form nbsSearchDialog contain a grid that display all the field of that query, it's strange that 1 field (I found that it in random position) in that grid (not the lookup field) lost the value (although it has a value in previous click)

And if I click the refresh button, everything normal again, if not then the bug still in there.

You can also try this with TDBGrid and the bug will appear if you scroll down the data and then up again.

TIA

NB:
This error doesn't appear in 6.1.5 version.
If I use the IBX components this bug not appear, so it must be Zeos bug
User avatar
cipto_kh
Senior Boarder
Senior Boarder
Posts: 83
Joined: 28.09.2005, 11:22
Location: Indonesia
Contact:

Post by cipto_kh »

Today I make some check for the pattern. Now I found the pattern that cause this bug. This error occur if at least has 1 lookup field with at least 1 field (persistant field from TZQuery) that the visible property (of that persistant field) is set to false.

This bug is not for Firebird/Interbase but FOR ALL (already try with MySQL too and combine with InforPower component, maybe other component also)!!!.
Here is the example:

Pre-condition:
1. TZQuery1 with persistant field: EMP_NO, FIRST_NAME, LAST_NAME, HIRED_DATE, DEPT_NO and persistant lookup field: LkpDeptName
2. TZQuery2 is the lookup table for DEPT_NO from TZQuery1
3. I arrange TZQuery1 persistant field with the order like this:
(1) EMP_NO
(2) FIRST_NAME
(3) LAST_NAME
(4) HIRED_DATE
(5) DEPT_NO
(6) LkpDeptName

Scenario 1:
1. I make visible property for EMP_NO field to false
2. Bug occur (after I click the nbsSearchDialog on wwDBNavigator) on field DEP_NO, that field will blank after scroll down and back again.

Scenario 2:
1. I make visible property for EMP_NO field to false
2. I make visible property for FIRST_NAME field to false
3. Bug occur (after I click the nbsSearchDialog on wwDBNavigator) on field HIRE_DATE, that field will blank after scroll down and back again.

Scenario 3:
1. I make visible property for EMP_NO field to false
2. I make visible property for DEPT_NO field to false
3. Bug occur (after I click the nbsSearchDialog on wwDBNavigator) on field HIRED_DATE, that field will blank after scroll down and back again.

Scenario 4:
1. I make visible property for EMP_NO field to false
2. I move the persistent field order in TZQuery1 to
(1) FIRST_NAME
(2) LAST_NAME
(3) HIRED_DATE
(4) DEPT_NO
(5) LkpDeptName
(6) EMP_NO
3. Everything normal

Bug Pattern:
1. It seems like the column value that retrieved from Resultset is always not correct if there is a field that visible=false in front of the lookup field. If there is no persistant lookup field then everything is normal
2. If there is 1 field that visible=false in front of the lookup field then the bug will occurs on: (lookup field position)-(number of field that visible=false)but sometimes not follow this pattern. So I have no idea for which field that the value will disappear

The IBX component doesn't has this bug and also BDE component (of course connect to paradox with Info Power component) doesn't has this bug. Anyone can fix this?

I already read the code but doesn't understand which code should I watch for this bug :([marq=right] [color=#] [/color]
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Thanks, for this research, cipto_ch

Can you package a small test project for it with the good and the bad situation (2 queries, 2 grids, I suppose).
I also need the sql to insert the data in the database. (I'll test it in mysql, but I suppose I can easyly change other sql dialects).
Can you append the file to the bug report you filed in the bug tracker? (Bug 34)

Mark
User avatar
cipto_kh
Senior Boarder
Senior Boarder
Posts: 83
Joined: 28.09.2005, 11:22
Location: Indonesia
Contact:

Post by cipto_kh »

I already put the small test project on there. Do you already have the Info Power components? I also include the .exe of that test project. And the database I use is employee.fdb (example database from FB 2), the database must in the same folder with the project, and I'm not use embedding in TZConnection (I use localhost with the name of the database file).

In that example is only for bad situation. The strange is if it displayed in DBGrid or wwDBGRID (Info Power DBGrid) the problem doesn't occur, but if I use the search dialog from wwDBNavigator this problem occur. But if I use IBX, ADO, BDE component with wwDBNavigator this problem doesn't exists.

You can insert new data from the grid in that project, or you need manual inserting via SQL?
Post Reply