Protected system.web.ui.webcontrols.dataGrid DataGrid1;
Private Void Page_Load (Object Sender, System.EventArgs E)
{
String dbpath = @ "DATA / DBTEST.MDB";
String DB = Server.mappath (dbpath);
String connectionString = "provider = microsoft.jet.Oledb.4.0; data source =" DB;
String strsql = "SELECT [CUSTOMERID], [Address] from customers";
DataSet DS = New Dataset ();
OLEDBCONNECTION CONN = New OLEDBCONNECTION (Connectionstring);
OLEDBCOMMAND CMD = New OLEDBCOMMAND (STRSQL, CONN);
OLEDBDataAdapter Da = New OLEDBDataAdapter ();
// link database operations through the Command
Da.selectCommand = CMD;
Da.fill (DS, "Testmdb");
DataGrid1.datasource = DS.TABLES ["TestMDB"]. DefaultView;
DataGrid1.databind ();
}