views:

88

answers:

3

Hello everyone,

This is my first application with a database. I'm using SQLite and Visual Studio. I have the database added, but how do I store and retrieve information from it? I'm using System.Data.SQLite as the .NET wrapper.

The wrapper obviously provides me with methods to create connections and execute queries, but is there an easier way to do this? Are there other libraries available that would make it any easier?

If there is no easier way, could somebody please point me in the direction of a decent tutorial for SQLite (or SQL in general)? Mostly a tutorial for how to structure my tables efficiently and how to write queries to store and retrieve data, specifically in C# with this wrapper if possible.

Thank you!

+2  A: 

If there is no easier way, could somebody please point me in the direction of a decent tutorial for SQLite (or SQL in general)?

http://sqlzoo.net/

dan04
+1 SqlZoo is really a good place to get started.
My Other Me
... a good place to get started if you want to use a low-level approach, why not use the advantages of the ADO.NET connector provided by System.Data.SQLite instead?
RedGlyph
+1  A: 

There is a tutorial on SQL Lite here http://www.eggheadcafe.com/articles/20040714.asp with ado.net.

Preet Sangha
+2  A: 

System.Data.Sqlite includes an option to enable Design-Time support in Visual Studio so you can use Server Explorer to view your Sqlite database within the IDE.

Another helpful tool is the free Sqlite2009 Pro at http://osenxpsuite.net/?xp=3&uid=managementtools.

You should also take a look at the System.Data.Sqlite helpfile where the author discusses the importance of transactions. He has a nice example that also shows how to use the using statement to create commands and transactions.

ebpower