using System;
using System.Data;
using System.Data.OleDb;
class MainClass
{
static void Main(string[] args)
{
OleDbConnection MyConnection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source = c:\Northwind.mdb");
OleDbDataAdapter MyAdapter = new OleDbDataAdapter("SELECT * FROM orders", MyConnection);
DataSet MyDataSet = new DataSet();
MyAdapter.Fill(MyDataSet, "orders");
MyDataSet.Tables[0].Rows[1]["ID"] = "1";
OleDbCommandBuilder MyBuilder = new OleDbCommandBuilder(MyAdapter);
MyAdapter.Update(MyDataSet.Tables[0]);
}
}
|