OleDbConnection cn = new OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=C:\\tblImp\\db1.mdb");
cn.Open();
DataSet ds = new DataSet();
OleDbDataAdapter da = new OleDbDataAdapter("select * from tblImp", cn);
da.Fill(ds, "tblImp");
tablecontrol.datasource() = ds.Tables[0];
tablecontrol.DataBind();

table is not populated with data from access database.
help me plz.

first, run your program in debug mode.

You need to insert a breakpoint at cn.Open and F11 through step by step.

Why? To see if the connection has even been made properly. I dont seen an InitialCatalog value for your connection string. This might need addending as well.

hi,
i am a beginner in asp.net. wat to do to populate table control from access database. above code is not workin. problem is in bindin data with table control. how to bind data to table control.
thanks for help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.