Fast Allocate
Sims, John
ayu8 at cdc.gov
Wed Nov 30 09:54:04 CST 2005
> -----Original Message-----
> From: valentina-bounces at lists.macserve.net
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of Ed Kleban
> Sent: Monday, November 28, 2005 1:08 PM
> To: Valentina Developers <valentina at lists.macserve.net>
> Subject: Fast Allocate
>
> Is there a faster way to allocate, say 1000 blank or
> common-value records all at once rather than simply calling
> SetBlank or filling up the memory buffer and then calling
> Table.AddRecord in a loop 1000 times?
>
>
Hi Ed,
If all of the values of all of the fields for all of the records are the
same, I am pretty sure you only need to call SetBlank once.
Psuedocode...
SetBlank
Assign values to fields
For I = 1 to 1000
iNewRec = DB.AddRecord() (or Call Db.AddRecord if you prefer)
Next
I'm sure Ruslan will correct me if I am wrong. All that said, if you
are changing just a couple of fields in each record, I think you can
still just call SetBlank once.
Psuedocode...
SetBlank
Assign values for "static" fields
For I = 1 to 1000
Assign values for "varying" fields
iNewRec = DB.AddRecord()
Next
Good luck.
-John
More information about the Valentina
mailing list