Import Data from a file or a lua table

Hello

I need to know if is there a way to import data from a file or a lua table.
What I’m trying to do, is download a json list of contacts from a server, over 10.000 rows and storing it in a lua table, but if i do this:

for ser = 1,#Contacts do
local tablefill =[[INSERT INTO Contactos VALUES (NULL, ‘]]…Contacts[ser].contactId…[[’,’]]…Contacts[ser].name …[[’);]]
db:exec( tablefill )
end

takes too much time and memory. there is something like bulkinserts? [import]uid: 169853 topic_id: 30388 reply_id: 330388[/import]

I’m not a sqlite / lua expert by far, but did you look into beginning a transaction? I believe Corona supports luaSQLite 3

http://luasqlite.luaforge.net/lsqlite3.html

let me know how it goes, I’ll pick at it a little more.
[import]uid: 21331 topic_id: 30388 reply_id: 121773[/import]

I’m not a sqlite / lua expert by far, but did you look into beginning a transaction? I believe Corona supports luaSQLite 3

http://luasqlite.luaforge.net/lsqlite3.html

let me know how it goes, I’ll pick at it a little more.
[import]uid: 21331 topic_id: 30388 reply_id: 121773[/import]