>>Hello,
>>
>>I need to do the following:
>>1) Query 100,000 lines from different tables and extract a string of about 200 characters per line,
>>2) Add each line to a variable plus line break,
>>3) Create a file (using StrToFile()) from the variable.
>>
>>I wonder how I can prevent performance problems by calling 100,000 times lcString = lcString + lcLine. This is going to re-allocate memory all the time, and I like to pre-allocate the needed memory for best performance. I remember having read an article about this many years ago (from Christopher) but I really do not remember anything about it, so I would be very thankful if somebody would give me a tip.
>
>Can you write to the file directly without using a variable and strtofile using fwrite function?
I could but I would expect this to take even more time, because as the file grows it would have to move it around quite a lot?
Christian Isberner
Software Consultant