开发者

Inserting large number of data (6000 entries) into sqlite table in one shot

开发者 https://www.devze.com 2023-01-24 13:53 出处:网络
In my iphone app, the Sqlite database has 6000 entries. Is there a way to inse开发者_JAVA百科rt the data in one shot or may be in fewer number of shots.

In my iphone app, the Sqlite database has 6000 entries. Is there a way to inse开发者_JAVA百科rt the data in one shot or may be in fewer number of shots.

I did try pasting the insert statements in Terminal in MAC OS but at a time only 15-20 statements get executed correctly.

How can we insert it at one go?

What should I do?

Please Suggest

Please Help

Thanks


I had to insert over 500,000 entries and was no problem. I did not do it on the terminal because I had troubles with non-ASCII characters (e.g. Umlaute). So I always used the firefox sqlite add-in. That worked pretty good. I pasted the prepared insert script into the box provided and pressed "execute". Then it took a couple of seconds and it was done. Later I had to calculate some values before inserting so I wrote a little objective-c program and that also worked well. If you like I can dig up the code.


Try using a sqlite manager (an add-on of Mozilla Firefox Web Browser) Where you can paste a pre created bunch of insert queries for 6000 items and execute them in one shot.This may help you I suppose

0

精彩评论

暂无评论...
验证码 换一张
取 消