Table Control, wats wrong

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2007
Posts: 33
Reputation: ansari.wajid is an unknown quantity at this point 
Solved Threads: 0
ansari.wajid ansari.wajid is offline Offline
Light Poster

Table Control, wats wrong

 
0
  #1
Sep 4th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 3
Reputation: jonathan.pucket is an unknown quantity at this point 
Solved Threads: 0
jonathan.pucket jonathan.pucket is offline Offline
Newbie Poster

Re: Table Control, wats wrong

 
0
  #2
Sep 4th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 33
Reputation: ansari.wajid is an unknown quantity at this point 
Solved Threads: 0
ansari.wajid ansari.wajid is offline Offline
Light Poster

Re: Table Control, wats wrong

 
0
  #3
Sep 5th, 2007
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC