Just for the record. I dropped Mono.Data.SqlClient and went with Sqlite-net instead.
One of the problems with Mono.Data.SqlClient was that I had a hard time figuring out how to adjust the busytimeout value - which I might suspect is the cause of the crash. As default Sqlite has a busytimeout at 0, meaning that it will throw an exception/crash if busy when called. So either you have to check if it is busy before executing queries - or set the busytimeout to an appropriate amount of time. Sqlite-net gave me the option to set the timeout - and that was the way I went. Thanks for any help in the thread. /Anders -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Anders Kjærgaard Hansen Sent: 10. juni 2011 10:20 To: Nic Wise Cc: [email protected] Subject: Re: [MonoTouch] Anyone knows a workaround for bug in Sqlite on iPad - or tell me what I am doing wrong. Hi I actually started out using Sqlite-net, but dropped it for some reason I don't totally remember. I think I felt I lost a bit control could be one issue. Especially about upgrading the database when new versions of the iPad app comes along. The second reason I can think of is that the codebase I am working with have some business objects that are shared between the iPad app, and the "normal" c# windows app, and these are the objects that are send across the network. And since Sqlite-net seems to require additional attributes added to these objects, I would need those in the Windows app as well, which I wasn't sure on how to handle. After a quick look through the source of Sqlite-net, it doesn't seem like Sqlite-net using the Mono.Data.Sqlite library, which I actually thought it would. So maybe my problem doesn't exist there - assuming that it is the Mono.Data.Sqlite library that fails, and not the underlying Sqlite3 db. Thanks for hinting me back to Sqlite-net - I might try it again, and see if it succeeds my small test app. /Anders -----Original Message----- From: Nic Wise [mailto:[email protected]] Sent: 10. juni 2011 10:11 To: Anders Kjærgaard Hansen Cc: srinivas; [email protected] Subject: Re: [MonoTouch] Anyone knows a workaround for bug in Sqlite on iPad - or tell me what I am doing wrong. This is possibly no help, but I use Sqlite-net http://code.google.com/p/sqlite-net/ Works great. Very quick. basic migrations. Linq support. Never had a problem with it. 2011/6/10 Anders Kjærgaard Hansen <[email protected]>: > Hi Srinivas > > I see one obvious difference in your code and the code I have sent in reply > to Karl's mail. > > You seem to create new connection objects for each request, and this might be > where I'm doing something wrong. > > Thanks for the sample - I will try to work with my small test solution and > get back. > > /Anders > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of srinivas > Sent: 9. juni 2011 15:29 > To: [email protected] > Subject: Re: [MonoTouch] Anyone knows a workaround for bug in Sqlite on iPad > - or tell me what I am doing wrong. > > I have used SQLite in my project but it was not for heavy data. I dont know > how big your application. I have created an helper class and some methods to > insert update and select the data. I am attaching the file. May be this can > help you getting some idea. > > Regards, > Srinivas > http://monotouch.2284126.n4.nabble.com/file/n3585542/SQLiteHelper.cs > SQLiteHelper.cs > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Anyone-knows-a-workaround-for-bug-in-Sqlite-on-iPad-or-tell-me-what-I-am-doing-wrong-tp3584781p3585542.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch > _______________________________________________ > 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/ | http://www.flickr.com/photos/nicwise 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 _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
