[ Related Articles and Replies ] [ DelphiLand Discussion Forum ]

Posted by webmaster Guido on March 02, 2002 at 22:32:05:

In Reply to: INDEX posted by Elmarie Swiegelaar on February 27, 2002 at 08:03:38:

: 1. Why does one sometimes get the ERROR "Index out of date" when working with Paradox tables.
: How do one fix this, currently I have to go to Database Desktop, open the table, delete the index
: and re-create it (that is if it allows me to open the database). Does anyone have code to update
: all indexes, say when before closing your application ???

: 2. How do one free memory ? I get a windows message "Out of System Recources" when working
: with reports, graphs and querying databases ??? (The computers used have at least 32MB of merory,
: how is it possible that it can run out of resources when compiling a series of reports)

1. This is a well known problem in Delphi database programming. Alas, there is no simple Delphi command to "reindex" a Paradox table.
The only solution is: try to keep the index updated, by immediately writing every change to the table to disk ("commit" the changes). I've seen several solutions, well described in several documents that you can find on the 'Net, but I can't recall where. Try Delphi sites with lots of tips, the search engines, and so on... and search for combinations of these keywords: delphi, paradox, index corruption, table, commit.

2. Well... 32MB of RAM isn't a lot, since to make even Windows 98 run smoothly you need 64MB. And Win XP needs at least 128MB.
But probably, "Out of System Resources" means that the Windows operating system is "out of GDI resources": this is not a shortage of RAM, but maybe you are exceeding Windows rather poor resources (especially Win95, Win98 is a bit better; Win NT, Win 2000 and Win XP are more stable).
E.g., this can happen when there are too many windows open at the same moment. By "windows" we mean: not only the Delphi "forms" that you *see* at that moment, but also the invisible (hidden) forms, plus all the "windowed" components on both visible and invisible forms! This usually happens when your application creates a lot of forms with lots of windowed components, such as TEdit boxes.
Possible solution: do not let Delphi auto-create all of these forms, but create some of them only right before showing them and destroy them right after hiding.

Related Articles and Replies:


[ Related Articles and Replies ] [ DelphiLand Discussion Forum ]