The other day I found that there is a .NET wrapper for sqlite. sqlite is a very cool embeddable SQL-92 database engine. It's a single library that gives you a very fast, very scalable (2TB), single file, multi-user database. I thought the .NET wrapper is exceptionally handy because ADO is slow, and is hard to use (compared to this) and a HUGE overkill for smaller apps. It lets smaller apps have a real relational database without huge numbers of dependencies, complicated installs, or the complexity of ADO. Here is a really quick example program I wrote to try it out:
System; System.Drawing; System.Collections; System.ComponentModel; System.Windows.Forms; System.Data; SQLite.NET; WindowsApplication2 { Form1 : System.Windows.Forms.Form { System.Windows.Forms.ListBox listBox1; System.ComponentModel.Container components = ; System.Windows.Forms.TextBox textBox1; System.Windows.Forms.Button button1; SQLiteClient db; Form1() { db = SQLiteClient(); InitializeComponent(); UpdateList(); } UpdateList() { SQLiteResultSet results; results = db.Execute(); listBox1.Items.Clear(); (ArrayList row in results.Rows) { listBox1.Items.Add(row[]); } } Dispose( disposing ) { ( disposing ) { (components != ) { components.Dispose(); } } .Dispose( disposing ); } InitializeComponent() { .listBox1 = System.Windows.Forms.ListBox(); .textBox1 = System.Windows.Forms.TextBox(); .button1 = System.Windows.Forms.Button(); .SuspendLayout(); .listBox1.Location = System.Drawing.Point(, ); .listBox1.Name = ; .listBox1.Size = System.Drawing.Size(, ); .listBox1.TabIndex = ; .textBox1.Location = System.Drawing.Point(, ); .textBox1.Name = ; .textBox1.Size = System.Drawing.Size(, ); .textBox1.TabIndex = ; .textBox1.Text = ; .button1.Location = System.Drawing.Point(, ); .button1.Name = ; .button1.Size = System.Drawing.Size(, ); .button1.TabIndex = ; .button1.Text = ; .button1.Click += System.EventHandler(.button1_Click); .AutoScaleBaseSize = System.Drawing.Size(, ); .ClientSize = System.Drawing.Size(, ); .Controls.Add(.button1); .Controls.Add(.textBox1); .Controls.Add(.listBox1); .Name = ; .Text = ; .ResumeLayout(); } [STAThread] Main() { Application.Run( Form1()); } button1_Click(object sender, System.EventArgs e) { db.Execute( + textBox1.Text.Replace(,) + ); UpdateList(); } } } http://jclement.ca/devel/dotnet/sqlite.html