I had to do this, too. I'm using the sqlite which comes _on_ the
iphone. I moved to a model where I open the connection each time -
never, EVER open it in a thread and then use it again outside of that
thread. It's cheap to open, too.



the only other option is to build sqlite from source and include it in
your app. Give then question, I suspect you are not doing this.

On Tue, Apr 3, 2012 at 13:09, Tomasz Cielecki <[email protected]> wrote:
> Hey Mojo,
>
> Have you actually tested that the SQLite version you are working with
> is not thread safe?
> https://www.sqlite.org/faq.html#q6
>
> Have you tried asking yourself why is it crashing? I can only think of
> one reason:
> - You are using the same database connection in multiple threads 
> simultaneously
>
> This problem will occur even though you are running SQLite in multi-thread 
> mode.
>
> Therefore you will most likely want to open a new connection in every
> thread you are going to want to communicate with the SQLite database.
>
> On Tue, Apr 3, 2012 at 1:50 PM, MojoDK <[email protected]> wrote:
>> Hi,
>>
>> I'm using SQLite (ver. 2.0.5.0) in my app. This SQLite is not threadsafe (my
>> app is crashing).
>>
>> Isn't there a threadsafe SQLite that works with Monotouch? ... if so, where
>> can I find it?
>>
>> Thanks!!!
>> Mojo
>>
>> --
>> View this message in context: 
>> http://monotouch.2284126.n4.nabble.com/Threadsafe-SQLite-tp4528562p4528562.html
>> Sent from the MonoTouch mailing list archive at Nabble.com.
>> _______________________________________________
>> MonoTouch mailing list
>> [email protected]
>> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
>
> --
> Med Venlig Hilsen / With Best Regards
> Tomasz Cielecki
> http://ostebaronen.dk
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch



-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to