Okay, I'll look at it..
Thank you very much for your help

On 31 Maj, 14:59, Mark Murphy <mmur...@commonsware.com> wrote:
> kaloer wrote:
> > Well, of course I shouldn't. This only adds one line when it's called.
> > Should I call it before the while-loop begins?
>
> You're right -- I skimmed it too quickly.
>
> It's actually a bit more complicated than that. The flow is:
>
> begin-transaction
> insert 100 rows worth of stuff
> set-transaction-successful
>
> and do that whole block 1000 times for 100,000 words.
>
> So you're probably going to wind up with something like:
>
> while ((line=input.readLine())!=null) {
>     DB.beginTransaction();
>     DB.execSQL(...);
>
>     for (int i=0;i<99 && (line=input.readLine())!=null; i++) {
>         DB.execSQL(...);
>     }
>
>     DB.setTransactionSuccessful();
>
> }
>
> plus an appropriate try/catch in there.
>
> However, bear in mind that this will still take a very long time, so
> unless you're trying this for educational purposes, I'd move along to
> one of the other options.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to