Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Oddity against Paradox through BDE

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
I'm seeing something strange on an old system we developed against a Paradox database some years ago.
The user has reported some oddities with the system (admittedly written 5+ years ago in Delphi 3). When entering data into the system, a DataGrid might show three entries that were entered (through DBEdits) with different Stock Codes but now all show the same in the underlying DataGrid as sharing the same code.
Similarly there were mentions that Master / Detail links were failing - in the sense that when a header was selected, sometimes the accompanying lines do not show (that is the detail lines do not show on a report for a selected header).

The real strange thing is, having got onto the machine in question today (through means of remote control dial-up) - when looking at the data in the 'detail' table there are a number of pages of blank records (all column cells were blank!). This is what I am seeing through the 'Data' tab in the SQL Explorer application. If I run an SQL expression like "SELECT * FROM Table1 WHERE ((Field1 IS NULL) OR (Field1 = ''))" then I get no entries in the resultant dataset.
The data above these few pages of blanks still appears to be OK and can be seen / worked with through our application OK.
Similarly the table structure should not allow blank / NULL entries as this would break the Primary Key against the table in question.
When I was showing this finding to a collegue we then saw that instead of blank entries in the column cells, some of them had nonsense character strings, and for the datetime fields we're seeing a nonsense date.
We've previously tried rebuilding / re-indexing the table(s) in question but this is a new one on me.
I'm pointing the blame at the machine itself - I'll be able to verify this tomorrow when I receive their data backup disks to run on a couple of test machines at our site here.

Has anyone come across anything like this in their travels ?

Thanks in advance
Steve
 
Steve,

In my experience, garbled data indicates a corrupt table or index. I've seen (rarely) cases where it might also be a caching issue and that might be more machine specific.

If the data looks normal on one machine but not the other, then I'd toward the latter explanation. In that cache, make certain that:

1. Opportunistic locking has been disabled.
2. LOCAL SHARE is enabled in BDE Admin.
3. Any network settings for packet size and so on are at least as large as the block size of the table(s) in question.

Again, the caching issue is more rare than the corruption one (especially since the data appears correct in an Answer table, one of the underlying strategies for saving tables that cannot be repaired). If rebuilding the table hasn't helped, then blow away the indexes and recreate them. That may make a difference.

hope this helps...

-- Lance
 
Thanks for the pointers Lance.
That begs my next question : I feel certain somewhere in my travels I've seen some utility / program written in Delphi that produces a report of the structure of PARADOX data tables - primary and secondary indexes, listing the field names that constitute these.
Can anyone suggest where I might have seen this or point me to something similar ?
Thanks again.
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top