// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Data; using System.Data.SQLite; namespace E { public class TestClass { public static void Main(string[] args) { SQLiteConnection con = new SQLiteConnection(@"Data Source=C:\TestEmb.db;Version=3;Password=hemmeligt;New=True"); con.Open(); SQLiteCommand cre = new SQLiteCommand("CREATE TABLE tbl (id INTEGER NOT NULL, txt NVARCHAR(50), PRIMARY KEY(id))", con); cre.ExecuteNonQuery(); for(int i = 0; i < 3; i++) { SQLiteCommand ins = new SQLiteCommand("INSERT INTO tbl VALUES(" + i + ",'Test" + i + "')", con); ins.ExecuteNonQuery(); } con.Close(); } } }