Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

 Write a program in ASP.NET to Show Data With Access?
Page_Load():-
    OleDbConnection x;
    OleDbCommand y;
    OleDbDataReader z;
    protected void Page_Load(object sender, EventArgs e)
    {
        x = new OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=c:\db1.mdb");
        x.Open();
        y = new OleDbCommand("select * from emp", x);
        z = y.ExecuteReader();
        while (z.Read())
        {
            Response.Write(z["ename"]);
            Response.Write("<hr>");  
        }
        z.Close();
        y.Dispose(); 
        x.Close(); 
    }