` Batch adding records (Paul Howard ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Batch adding records
2008-08-24 -- Paul Howard
 
Yes, for TPS, LOGOUT/COMMIT every 1000 records or so is faster than STREAM/FLUSH every 1000 records, and works on shared files. Avoid this tight loop for anything but small sets of adds cus it will be unfriendly towards other processes and users and there is no way to bail, no screen refreshes, etc. Use the report or process template and add a logout/commit every 1000 records. Add LOGOUT after parent.OpenReport if returnvalue = 0 (yes, there is an OpenReport in Process!), add COMMIT,LOGOUT after parent.TakeRecord when (SELF.RecordsProcessed % 1000) = 0) and add final COMMIT in TakeCloseEvent. FWIW, I have an include file that is used to copy all records between two files and rebuild keys with progress and bailout using a timer. It's very fast and includes an option to use either stream or logout. STREAM is faster than LOGOUT on Btrieve and maybe other drivers. TPS LOGOUT is very fast as long as you commit in chunkes.


Today is November 21, 2024, 8:06 am
This article has been viewed 35217 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: