Steve Aish wrote:
Hi y'all,
I have a database that records approx 500,000 records per week in one table.
I want to compare week 1 and week 2 for example to see which of a
certain field are in week 1 but not in week 2.
I am using Interbase.
I thought of running a query (until my pc ran out of hard drive space with the temp file size).
I thought the easiest (although probably not the best) way would be to
fill in a stringlist (I am only worried about 1 field) with week 1 and
then fill another stringlist with week 2 and then compare them. I just
open a query with one field in it and iterate through the query and
List.Add(Query1.FieldByName('Field').asString);
This runs out of memory after 200,000 records or so. It is not the string list running out of memory - it is the Query1... ??? Confuses me.
Any ideas?
Is it Delphi or the TQuery or Interbase that's giving the error? And are you getting an 'out of memory' error rather than an error when trying to use some memory that should've been allocated - and if so why.
There were some versions of IB (around D4 or D5) that under certain conditions would give an 'out of memory' error without being out of memory. Additionally, some of IB's memory is shared between all applications so if you get this error you probably need to shut down *everything* with a db connection - including delphi, db explorer, your app and any other app's touching Interbase.
If it is the TQuery, do you have any other db components around that you can try reasonably simply?
Lastly, don't know that this'll help, but if the out of memory error is caused by actually being out of memory - seems unlikely - and the stringlist is chewing up memory, it may not be leaving enough for the TQuery, so setting the stringlist.Capacity may help.
Cheers, Kurt. _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
