Page 1 of 1

using sqlrecord_create for a lot of rows

Posted: Fri Oct 11, 2013 2:16 pm
by trevordevore
I am populating a table from an array.

The array holds one record for each table row.

I am using sqlrecord_create to do this and calling it each time I step through each array record.

reading the answer to the question on the speed of sqlrecord_create got me thinking I may be doing this inefficiently as I seem to be doing multiple writes to the database file, one for each record when I should do a single write where I commit all the records at once.

Is my thinking correct here?

If so, how do I batch all these record creations for a single write episode?

James

Re: using sqlrecord_create for a lot of rows

Posted: Fri Oct 11, 2013 2:16 pm
by trevordevore
just did a search on the Livecode user list and found your answer to another user.

basically fill an indexed array from the repeated calls to "sqlrecord_set" and use this array as the argument for "sqlrecord_create"

so answered :-)