🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.database
1 messages
1 total messages Started by Andy Butler Wed, 11 Mar 2009 21:43
Delphi BDE Table problem with recordcount.
#181
Author: Andy Butler
Date: Wed, 11 Mar 2009 21:43
31 lines
2301 bytes
Hi,
hope it is appropriate to ask here.

I have a database application which I wrote for a client and is now behaving strangely.

Delphi 2006, paradox database, BDE.

I have a table which I check for RecordCount before performing a number of functions.

MyTable.RecordCount is sometimes returning a value of one less than the actual number of records.

I tried using a Query, SELECT COUNT(*) FROM MyTable  , and this produces the same result.

MyTable is the detail in a detail-master relationship, and as I scroll through the main table most
of the time RecordCount comes out correct, just that for a few of the Master table records, the corresponding
RecordCount in the detail is incorrect.

Weirdly, this is code that worked perfectly for years.

So, obviously I'm looking for some kind of quick fix, as this problem is making the 
software unusable for the client.
Most worrying thing is that I use RecordCount throughout the application, if this
becomes a problem with other Tables I'm looking at an absolute nightmare.

I understand that I may be able to use BOF and EOF as an alternative way of checking
for an empty table, and iterating through each record, trouble is, it will take
weeks to go through every instance of Recordcount in all my software.

thank you for any hints

andy butler 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads