// 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.SqlClient; namespace E { public class MainClass { public static void Main(string[] args) { SqlConnection con = new SqlConnection(@"server=ARNEPC3\sqlexpress;Integrated Security=SSPI;database=Test"); con.Open(); for(int i = 5; i <= 10000; i++) { SqlCommand ins = new SqlCommand("INSERT INTO tabel2 VALUES(" + i + ",'Test" + i + "')", con); ins.ExecuteNonQuery(); } con.Close(); } } }