I hit a strange one, the saga of the three table add.
All files are Paradox 7 with primary keys, 16 block size, 555 byte record size, and each verify as OK. They are:
US (338829 records)
EU (179069 records)
JP (81668 records)
The addition often results in a corrupt table based on the sequence of additon.
US+EU+JP = No Good repeatable on multiple machines and OS's, Paradox 10 and 11 and C++ builder custom code. It is apparently the BDE.
US+EU = Good
US+JP = Good
US+(EU+JP) = Good and this was my solution
Paradox is running single user, local database at the time. Has anyone seen this? I'm concerned as I will be concatinating databases from other countries very soon and I'm a little nervous. The BDE settings have Local Share True and all the common tweaks for memory etc.
What methodology are you using to add the records? a QBE query? Code in a script?
If it were a Key collision you'd end up with an error message, not a corrupt table, so it's not that. It might be a storage issue, maybe BDE settings would help. I wonder if you should close and reopen the tables between adds, to clean up temp data and force data writes.
As a rule, I try to use SQL to do this kind of thing rather than the raw table adds.
Yahoo ID: Commander_Bombast
Opportunity is missed by most because it is dressed in overalls and looks like work.
Thanks for the reply. I've used Paradox Table Add from the menu in Paradox 10 and 11. I've also used two TTables and a TBatchMove component in C++ (which I've done successfully literally hundreds of times.). Here is what that code looks like:
The TBatchMove mode is set to 'append' of course. I do get key violations using this if they exist. Both computers that I've run this on have huge amounts of both ram and disk storage. The BDE is set as follows:
Local Share True Low Memory Usage Limit 32 Maxbufsize 16384 Maxfilehandles 100 Memsize 42 Minbufsize 4096 MTS Pooling False Shared Memory Location is blank Shared Memory Size is 14080 SQLQryMode is blank Sysflags is 0 Version is 4
The storage, the methodology and the BDE settings are the same when I perform the table addition that does work. It is only the sequence of the addition that affects the outcome.
The table becomming corrupt has 108 fields. What SQL would you suggest? Could I use
Insert into table1 select * from table2
It wouldn't be much fun to map all the columns in the statement. Would I still be aware of key violations?