Jump to content


Photo

DBGridView not handling deleted records properly


  • Please log in to reply
5 replies to this topic

#1 Tack

Tack
  • Members
  • 6 posts

Posted 17 January 2005 - 08:36 AM

Boki-

DBGridView seems to determine the grid row count based upon dataset.recordCount. Since recordCount includes deleted records the grid attempts to display rows beyond logical EOF if hideDeletedRecs is true.

Regards,
Tack

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 17 January 2005 - 04:58 PM

Hello Tack,

I think that I have fix this in next quick fix.

regards

#3 Tack

Tack
  • Members
  • 6 posts

Posted 22 January 2005 - 09:28 AM

Hi Boki-

Sorry but DBGridView deleted record handling is unchanged. With hideDeletedRecs set true DBGridView still tries to display a number of rows equal to recordCount. When the database engine reaches logical EOF & stops delivering record data DBGridView continues to add blank rows until the row count = recordCount. It fills the first phantom row with data from the last good record (still in the record buffer I suppose) and the rest with default values.

Regards,
Tack

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 22 January 2005 - 05:17 PM

Hello Tack,

Hm, I will need to check it again. I have test it with mySQL and BDE all was work fine sad.gif

I will need to check it again

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 Tack

Tack
  • Members
  • 6 posts

Posted 24 January 2005 - 04:19 AM

Boki-

>Hm, I will need to check it again. I have test it with mySQL and BDE all was work fine.

Aha, the mystery is solved. DBF tables do not change recordCount after a record is marked for deletion. We use the Topaz database engine for routine standalone apps & that is what I used to test DBGridView. BDE, mySQL, and Access all reset recordCount when records are deleted - hence the confusion.

We use FlashFiler for client-server apps or when speed and fault tolerance are factors. It is a drop in BDE replacement so I tested DBGridView with it and it, naturally, behaves as we would expect upon record deletion.

Fixing this for all database engines would require a fair amount of rewriting so perhaps you should simply advertise that the data aware components are not compatible with dBase/FoxPro-type tables.

I'd like to convert some apps to Berg components for some appearance and behavorial reasons (and am really looking forward to SheetView) but there seem to be a number of small problems to overcome, for instance:
Wim's append record problem remains - so back to testing..

rgds
Tack

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 24 January 2005 - 04:37 AM

Hello Tack,

As I have see in Delphi DBGrid, this component set RowCount to min 100 and then component go record by record testing EOF and display data.

I have try to skip this behaviour because ScrollBar MAX is unknown and selected record must be on screen sad.gif and this may be ugly and not very user friendly.

But, it seem that I will need to add one more "classic" mode (more similar to Delphi DBGrid) for using with some databases.

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users