Board index » delphi » duplicate record displayed on dbgrid

duplicate record displayed on dbgrid

When I open up a table (interbase -> ttable) and display the data in a
dbgrid,
it gives me duplicate rows when I use certain index. For every duplicate

row
displayed, a REAL record would be missing.
When I scroll the duplicate off the grid and scroll it back, the
rightful owner of the spot
shows up.
At first I thought it is a clich in infopower components. However, after

dropping
ttable, tdatasource and tdbgrid on the form and connecting them to the
interbase
table without a single line of code gives me exactly the same problem.
Any idea how to get about this bug?
This should have nothing to do with interbase. A query from interbase
displays
correct result.
A simple tdataset->grid and database explorer display dupes.
I suspect that this is cause by a problem in either BDE or
TDataset/TTable implementation.
Did anyone encounter this problem before?
It would be appreciated if you can share your workarounds.
Thank you:)

-Jeff

 

Re:duplicate record displayed on dbgrid


What LANGUAGE DRIVER you have set in BDE cfg. A testcase would help to
narrow down your problem. dbgrid might show duplicates  if your language
driver sort order doesn't match with the sort order on the server. Not a BDE
problem.

T.Ramesh.

Quote
Jeff Kuochan wrote:
> When I open up a table (interbase -> ttable) and display the data in a
> dbgrid,
> it gives me duplicate rows when I use certain index. For every duplicate

> row
> displayed, a REAL record would be missing.
> When I scroll the duplicate off the grid and scroll it back, the
> rightful owner of the spot
> shows up.
> At first I thought it is a clich in infopower components. However, after

> dropping
> ttable, tdatasource and tdbgrid on the form and connecting them to the
> interbase
> table without a single line of code gives me exactly the same problem.
> Any idea how to get about this bug?
> This should have nothing to do with interbase. A query from interbase
> displays
> correct result.
> A simple tdataset->grid and database explorer display dupes.
> I suspect that this is cause by a problem in either BDE or
> TDataset/TTable implementation.
> Did anyone encounter this problem before?
> It would be appreciated if you can share your workarounds.
> Thank you:)

> -Jeff

Re:duplicate record displayed on dbgrid


Thanks for the reply!
The language driver is NOT set. Is that my problem?
I'm using default settings for interbase in BDE.
Any idea what language driver I should be using?

-Jeff

Quote
Ramesh Theivendran wrote:
> What LANGUAGE DRIVER you have set in BDE cfg. A testcase would help to
> narrow down your problem. dbgrid might show duplicates  if your language
> driver sort order doesn't match with the sort order on the server. Not a BDE
> problem.

> T.Ramesh.

> Jeff Kuochan wrote:

> > When I open up a table (interbase -> ttable) and display the data in a
> > dbgrid,
> > it gives me duplicate rows when I use certain index. For every duplicate

> > row
> > displayed, a REAL record would be missing.
> > When I scroll the duplicate off the grid and scroll it back, the
> > rightful owner of the spot
> > shows up.
> > At first I thought it is a clich in infopower components. However, after

> > dropping
> > ttable, tdatasource and tdbgrid on the form and connecting them to the
> > interbase
> > table without a single line of code gives me exactly the same problem.
> > Any idea how to get about this bug?
> > This should have nothing to do with interbase. A query from interbase
> > displays
> > correct result.
> > A simple tdataset->grid and database explorer display dupes.
> > I suspect that this is cause by a problem in either BDE or
> > TDataset/TTable implementation.
> > Did anyone encounter this problem before?
> > It would be appreciated if you can share your workarounds.
> > Thank you:)

> > -Jeff

Re:duplicate record displayed on dbgrid


Well, you just discovered a bug of TTable when
used for a server db. As far as I know this occures
in random cases and a possible solution is to
Close and re Open the Database connection.

Calling Refresh will do nothing.

Greetings.

Quote
Jeff Kuochan wrote:
> Thanks for the reply!
> The language driver is NOT set. Is that my problem?
> I'm using default settings for interbase in BDE.
> Any idea what language driver I should be using?

> -Jeff

> Ramesh Theivendran wrote:

> > What LANGUAGE DRIVER you have set in BDE cfg. A testcase would help to
> > narrow down your problem. dbgrid might show duplicates  if your language
> > driver sort order doesn't match with the sort order on the server. Not a BDE
> > problem.

> > T.Ramesh.

> > Jeff Kuochan wrote:

> > > When I open up a table (interbase -> ttable) and display the data in a
> > > dbgrid,
> > > it gives me duplicate rows when I use certain index. For every duplicate

> > > row
> > > displayed, a REAL record would be missing.
> > > When I scroll the duplicate off the grid and scroll it back, the
> > > rightful owner of the spot
> > > shows up.
> > > At first I thought it is a clich in infopower components. However, after

> > > dropping
> > > ttable, tdatasource and tdbgrid on the form and connecting them to the
> > > interbase

(8X 8X 8X 8X 8X)

Re:duplicate record displayed on dbgrid


Closing and opening didn't help either:(
It can't be random(although it looks that way), there has to be a pattern
and a reason for it.
I opened a case with Inprise, but there is no response from them yet.
Hopefully, I will get some tomorrow.

-Jeff

Quote
Siozos Athanasios wrote:
> Well, you just discovered a bug of TTable when
> used for a server db. As far as I know this occures
> in random cases and a possible solution is to
> Close and re Open the Database connection.

> Calling Refresh will do nothing.

> Greetings.

> Jeff Kuochan wrote:

> > Thanks for the reply!
> > The language driver is NOT set. Is that my problem?
> > I'm using default settings for interbase in BDE.
> > Any idea what language driver I should be using?

> > -Jeff

> > Ramesh Theivendran wrote:

> > > What LANGUAGE DRIVER you have set in BDE cfg. A testcase would help to
> > > narrow down your problem. dbgrid might show duplicates  if your language
> > > driver sort order doesn't match with the sort order on the server. Not a BDE
> > > problem.

> > > T.Ramesh.

> > > Jeff Kuochan wrote:

> > > > When I open up a table (interbase -> ttable) and display the data in a
> > > > dbgrid,
> > > > it gives me duplicate rows when I use certain index. For every duplicate

> > > > row
> > > > displayed, a REAL record would be missing.
> > > > When I scroll the duplicate off the grid and scroll it back, the
> > > > rightful owner of the spot
> > > > shows up.
> > > > At first I thought it is a clich in infopower components. However, after

> > > > dropping
> > > > ttable, tdatasource and tdbgrid on the form and connecting them to the
> > > > interbase

> (8X 8X 8X 8X 8X)

Other Threads