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