SQLiteConnection.CreateFile("MyDatabase.sqlite");
SQLiteConnection m_dbConnection = new SQLiteConnection("Data Source=MyDatabase.sqlite;Version=3;");
m_dbConnection.Open();
string sql = "create table
project (name varchar(100), id int)";
SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection);
command.ExecuteNonQuery();
sql = "insert into project (name, id) values ('project 1',
1)";
command = new SQLiteCommand(sql,
m_dbConnection);
command.ExecuteNonQuery();
sql = "select * from project order by id desc";
command = new SQLiteCommand(sql,
m_dbConnection);
SQLiteDataReader reader = command.ExecuteReader();
while (reader.Read())
Console.WriteLine("Name: " + reader["name"] + "\tScore:
" + reader["id"]);