My Paradox table has grown to about 130 MB.Now whenever I try to insert a new record to the table (from code or Database desktop), I geta “Table is Full” error.
I looked at Borland’sWeb site, and it says Paradox limits aretwo billion records or bytes per table. So why this problem (my table record count is about 1.7 milion)?
The problem’s not with Delphi, but with the BDE and your table.
Yes, Paradoxtables conceivablycan be up to 2 GB (though I’ve had nothing butproblems with large tables in Paradox). But there’s a trick to it. You haveto set up the right block size in the BDE. Here’s a quick table of the tablesizes you should be able to achieve with the associated block size:
|Block Size (K)||Table Size|
To set the block sizes in the BDE, do the following:
- Open up the BDE Configuration Manager
- Click on the Paradox driver entry
- In the Block Size field in the Parameters list, change the block size to the size you prefer. I use 16K (or 16384 bytes; should be in multiples of 1024, so 16K = 16×1024)
- Save the IDAPI file.
From now on, every time you create a table, it will have the block size youspecified. For your current problem, you’re going to have create a new tablewith the same structure as the original, then add the records from theoriginal into the new table. From there, you shouldn’t have any “Table is Full” errors.
One caveat: You might be tempted to use the 32K block size. Don’t. It’s unsafe.
Actually, at any block size, tables in excess of 500 MB start showingvery strange behavior. For instance, I have a table that is 688 MB with more than 2.5 million records. I can’t sort it, because once the temporary table that gets created during a sort reaches 512 MB, I get a “resource limit exceeded” error. Apparently, the temporary tables are bydefault 8K. The unfortunate thing is that you can’t change this. Yikes!Furthermore, large tables that have 32K block sizes cause errors in queries(i.e., you get corrupt data when using tables with 32K block sizes, andregularly at that).