I would say that you should use whatever makes the most sense for your application. If you want to be able to share the data calls across platforms then ADO.NET might be a good route to go. Of course, you can mix and match too. Personally, I like using the SQLiteOpenHelper to manage my database versioning and schema updates, since it gives you nice hooks into that lifecycle, and it will also handle creating the database for you if it doesn't already exist. Once it does, it also provides you with the file path, so you can then use whatever you want to access it. I have a post up that first describes the "Android way" using only the SQLiteOpenHelper, and then shows an example of using the sqlite-net ORM in conjunction with SQLiteOpenHelper. I've grown to like this pattern, since it gives me a lot of flexibility on how I actually query the database.
http://www.gregshackles.com/2011/02/using-a-database-in-monodroid-applications/ - Greg On Tue, May 17, 2011 at 9:04 AM, milop <mi...@slomins.com> wrote: > Hi, Karl. > > I've never used SQLite either and so far I'm not a big fan. > > Half of my confusion is whether I should use SQLiteOpenHelper or the SQLite > ADO.Net provider. > > I'm learning Android and in all the reading, naturally it all alludes to > SQLiteOpenHelper. > > This whole thing of passing the version and firing events for Create and > Update, to me, is silly. > > I like your code. I'd rather use ADO.Net but am unsure how to implement it > based on the reading I've been doing. > > What do you do? On the Application OnCreate event do you use file > operations > to create the database? How do you implement DB changes? Any what is your > connection string? I noticed you didn't use one. > > I cannot find guidance anywhere in the Mono site, here or the main one, > that > has any guidance. More like "You can use SQLiteOpenHelper or ADO.Net", but > they give no pros/cons of both. > > Thanks again, > > Mike > > -- > View this message in context: > http://mono-for-android.1047100.n5.nabble.com/Insert-2000-rows-into-SQLite-tp4401830p4403449.html > Sent from the Mono for Android mailing list archive at Nabble.com. > _______________________________________________ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid >
_______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid