Solved

SQLite with C# using SQLiteWrapper

Posted on 2014-10-16
3
681 Views
Last Modified: 2014-10-19
I want to work on a sqlite3 database using SQL from C#. I have installed SQLitewrapper and I have the code below, which runs without error (but without any real action). I want help to get started, examples on how to scan through a table and eventually retrieve and manipulate values, and also how to run and display sql statements. Code examples can be in C#, VB6 or Foxpro.

TIA, your help is much appreciated!

        private void button1_Click(object sender, EventArgs e)
        {
            SQLiteBase db = new SQLiteBase("d:\\projects\\sqlite\\test.db");
            DataTable table = db.ExecuteQuery("SELECT * FROM fields;");
            dataGridView1.DataSource = table.TableName ;
            dataGridView1.Show();
            db.CloseDatabase();
        }
0
Comment
Question by:krhag28
  • 2
3 Comments
 
LVL 41

Expert Comment

by:pcelba
ID: 40384256
0
 

Author Comment

by:krhag28
ID: 40384373
OK, that's some good links, but all pointing to info about ODBC use. My first option is to use a COM based wrapper, and I found SQLITEWrapper.dll, which I intend to use. So the question is based on this.

However, since "everything" points in the direction of ODBC I will explore this also. Can you suggest a good and free ODBC driver?
0
 
LVL 41

Accepted Solution

by:
pcelba earned 500 total points
ID: 40384955
I've used ODBC driver from Christian Werner: http://www.ch-werner.de/sqliteodbc/

You may also find some free client tools (e.g. http://sqlitestudio.pl) so you may access SQLite database as if you were in Management Studio.

I would guess the OLE access will be a little bit slower than ODBC.

Did you try ADO.NET provider for SQLite? It should be good option for C#: http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki

You may also look at variety of SQLite implementations on the wiki: http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Reference issues in Visual Studio 3 30
C# bracket error 3 31
Create a WebAPI using a generic return parameter 9 25
What Does This C# Code Block Do? 5 30
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question