severe bug in tcrdbgrid / odac 6.90.0.56 / bcb 2010

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
albourgz
Posts: 160
Joined: Wed 06 May 2009 12:17
Location: belgium

severe bug in tcrdbgrid / odac 6.90.0.56 / bcb 2010

Post by albourgz » Fri 19 Mar 2010 10:06

Dear all,
the following select returns no rows in sqlplus:

Code: Select all

SELECT bg.ID, peli.JobList, bg.bgStageName as StageName,
       pr.Reference||' V'||pr.version as produit, pr.name, bg.groupName, bg.totTodo, bg.totDone, state, groupRef, 
       currentOperator, tag, bg.peliID, peli.PRIORITY, cec.GetBlocked(bg.id) as block, ps.FUBackColor, bg.subProduct, cec.QCControlsAskedCount(bg.id, bg.stageId) AS QCA, cec.QCControlsAskedCount(bg.id, -bg.stageId) AS QCB, bg.StageID

FROM CEC.BatchGroups bg, cec.VPRODUCTS pr, cec.vPeli peli, cec.vasproject_stages ps



WHERE bg.SubProduct=PR.ID and bg.PeliID=peli.ID and bg.stageId=ps.StageId


 AND bg.BGStageName='EIDR1.preshipping'  and bg.state IN (3,4,5) and ps.Passive='N' AND PELI.DTARRIVAL>=TO_DATE('2009-12-17','YYYY-MM-DD')
group by 
bg.ID, peli.JobList,bg.StageID, bg.bgStageName,
 pr.Reference||' V'||pr.version, pr.name,
 bg.groupName, bg.totTodo, bg.totDone, state, groupRef, currentOperator, tag, bg.peliID, peli.PRIORITY, bg.subProduct, ps.FUBackColor
ORDER BY priority desc, joblist, bg.groupname
However, one row is displayed in the corresponding TCRDBGrid, row where bgstagename='Gen.P_G'.
(no active filter in crdbgrid)

The problem occurs when you reduce the selection and change the sql so that no row is returned. The first row of the grid will still be displayed. If you change the grid parent and move the grid to another form (to force redisplay, the row is no more displayed. So the problem is the display, not the query.
PS: This occurs only if the grid has child grids.

Why why why?

albourgz
Posts: 160
Joined: Wed 06 May 2009 12:17
Location: belgium

behaviour change in DrawColumnCell event

Post by albourgz » Fri 19 Mar 2010 11:13

In bcbField->DataSet->Eof && Column->Field->DataSet->Bof)
return;
}
catch(...) { return; }

TFields * Flds=Column->Field->DataSet->Fields;
TColor nColor; // from int: BGR and not RGB

//... tests on fields values to set nColor

DBGridDict->Canvas->Brush->Color=nColor;
DBGridDict->DefaultDrawColumnCell(Rect, DataCol, Column, State);
}
[/code]

In bcb 2010, I have to add lines in case of EOF, to force painting in whit if grid is empty:

Code: Select all

try {
if (Column->Field->DataSet->Eof && Column->Field->DataSet->Bof) {
            DBGridDict->Canvas->Brush->Color=clWhite;
            DBGridDict->DefaultDrawColumnCell(Rect, DataCol, Column, State);
            return;
      }
}
...
I would like to have a patch for this to avoid changing 100 grids.
Do I have to ask to embarcadero or to devart?

Regards.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Tue 23 Mar 2010 10:06

Hello

We have tried to reproduce the problem but failed. Can you give us a simple example with TCRDBGrid where this problem can be reproduced?

Post Reply