User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 426,464 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,242 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 752 | Replies: 2
Reply
Join Date: Aug 2007
Posts: 28
Reputation: ansari.wajid is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ansari.wajid ansari.wajid is offline Offline
Light Poster

Question Table Control, wats wrong

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2007
Posts: 3
Reputation: jonathan.pucket is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
jonathan.pucket jonathan.pucket is offline Offline
Newbie Poster

Re: Table Control, wats wrong

  #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  
Join Date: Aug 2007
Posts: 28
Reputation: ansari.wajid is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ansari.wajid ansari.wajid is offline Offline
Light Poster

Re: Table Control, wats wrong

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 3:44 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC