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
using sqlrecord_create for a lot of rows
Moderators: FourthWorld, heatherlaine, Klaus, robinmiller, trevordevore
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
using sqlrecord_create for a lot of rows
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Re: using sqlrecord_create for a lot of rows
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
basically fill an indexed array from the repeated calls to "sqlrecord_set" and use this array as the argument for "sqlrecord_create"
so answered
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder