// 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"); con.Open(); SQLiteCommand sel = new SQLiteCommand("SELECT * FROM tbl", con); SQLiteDataReader rdr = sel.ExecuteReader(); while(rdr.Read()) { Console.WriteLine((long)rdr[0] + " " + (string)rdr[1]); } rdr.Close(); con.Close(); } } }