// 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.SqlClient; class MainClass { public static void Main(string[] args) { SqlConnection con = new SqlConnection("server=ARNEPC2\\ARNEPC2RUN;Integrated Security=SSPI;database=TestMSDE"); con.Open(); SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM T1", con); SqlCommandBuilder cb = new SqlCommandBuilder(da); da.InsertCommand = cb.GetInsertCommand(); DataSet ds = new DataSet("T1"); da.Fill(ds, "record"); ds.ReadXml(@"C:\T1.xml"); da.Update(ds, "record"); con.Close(); } }