Board index » delphi » Duplicated records in DBGrid

Duplicated records in DBGrid

1) Running Delphi 5 with Oracle 8. I have a standalone table with a
primary key on one filed and a unique key on another numeric field. This
second filed does not contain any values (always null). When displaying
the table in the DBGrid, the records are duplicated.

2) When this table is engaged as a child in a parent/child relation with
another table via foreign/primary key, the records in the child table
are duplicated.

Any suggestions on what could be wrong and/or how to overcome this
problem?
(This behavior does not manifest itself in the Delphi 4/Oracle 7
environment).

Thanks, GZ

 

Re:Duplicated records in DBGrid


Gary

1st make sure that you have the latest drivers for the BDE for oracle 8. you
can get them from http://www.borland.com/devsupport/bde/bdeupdate.html.

There was a problem with the oracle 8 driver that resulted in doubling of
records. If the number of rows returned from the table is a multiple of the
rowset size (in the BDE settings) then the problem you have described may
occur. I'm not sure whether this has been fixed or not.

- Simon

Quote
Gary Zlatkin <zlat...@home.com> wrote in message

news:3A9A8648.76798F89@home.com...
Quote
> 1) Running Delphi 5 with Oracle 8. I have a standalone table with a
> primary key on one filed and a unique key on another numeric field. This
> second filed does not contain any values (always null). When displaying
> the table in the DBGrid, the records are duplicated.

> 2) When this table is engaged as a child in a parent/child relation with
> another table via foreign/primary key, the records in the child table
> are duplicated.

> Any suggestions on what could be wrong and/or how to overcome this
> problem?
> (This behavior does not manifest itself in the Delphi 4/Oracle 7
> environment).

> Thanks, GZ

Re:Duplicated records in DBGrid


Gary,

The fix for this seems to be to  set Rowset Size to 1, which in turn
leads to great inefficiencies.  I strongly suggest that you have a look
at Direct Oracle Access (www.allroundautomations.nl), which allows you
to set the number of rows returned in a single fetch.

John Pierce

Re:Duplicated records in DBGrid


I do have the current version of the BDE (5.1.1). Changing the ROWSET SIZE
doesn't seen to have any affect on that behavior

GZ

Quote
Simon Moscrop wrote:
> Gary

> 1st make sure that you have the latest drivers for the BDE for oracle 8. you
> can get them from http://www.borland.com/devsupport/bde/bdeupdate.html.

> There was a problem with the oracle 8 driver that resulted in doubling of
> records. If the number of rows returned from the table is a multiple of the
> rowset size (in the BDE settings) then the problem you have described may
> occur. I'm not sure whether this has been fixed or not.

> - Simon

> Gary Zlatkin <zlat...@home.com> wrote in message
> news:3A9A8648.76798F89@home.com...
> > 1) Running Delphi 5 with Oracle 8. I have a standalone table with a
> > primary key on one filed and a unique key on another numeric field. This
> > second filed does not contain any values (always null). When displaying
> > the table in the DBGrid, the records are duplicated.

> > 2) When this table is engaged as a child in a parent/child relation with
> > another table via foreign/primary key, the records in the child table
> > are duplicated.

> > Any suggestions on what could be wrong and/or how to overcome this
> > problem?
> > (This behavior does not manifest itself in the Delphi 4/Oracle 7
> > environment).

> > Thanks, GZ

Re:Duplicated records in DBGrid


Hello!

Do you see under SQL Explorer duplicates too?

Tomasz.

Re:Duplicated records in DBGrid


Hi. Sorry for the late response.

Yes, I do see it under the SQL Explorer.

Thx, GZ

Quote
Tomasz Gliwa wrote:
> Hello!

> Do you see under SQL Explorer duplicates too?

> Tomasz.

Other Threads