using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using System.Data;
namespace My_Project
{
public partial class WebForm1 : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
if (!IsPostBack)
string sFilePath = Server.MapPath("StudentDb.mdb");
DataTable dt;
OleDbConnection conn= new OleDbConnection("Provider=Microsoft.Jet.OLEB.4.0;Data Source=" + sFilePath + "; Persist Security Info=False;");
using(conn)
if(conn.State==ConnectionState.Closed){
conn.Open();
}
OleDbCommand cmd = new OleDbCommand("Select * from Students",conn);
OleDbDataAdapter oDA = new OleDbDataAdapter(cmd);
dt = new DataTable();
oDA.Fill(dt);
gvDetails.DataSource=dt;
gvDetails.DataBind();
im getting this error
please help me regarding this...