// 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 FirebirdSql.Data.Firebird; namespace E { public class TestClass { public static void Main(string[] args) { FbConnection.CreateDatabase("ServerType=1;Database=TestEmb.fdb;User=sysdba;Password=masterkey"); FbConnection con = new FbConnection("ServerType=1;Database=TestEmb.fdb;User=sysdba;Password=masterkey"); con.Open(); FbCommand cre = new FbCommand("CREATE TABLE tbl (id INTEGER NOT NULL, txt VARCHAR(50), PRIMARY KEY(id))", con); cre.ExecuteNonQuery(); for(int i = 0; i < 3; i++) { FbCommand ins = new FbCommand("INSERT INTO tbl VALUES(" + i + ",'Test" + i + "')", con); ins.ExecuteNonQuery(); } con.Close(); } } }