How to display a table on windows application in c#

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2007
Posts: 2
Reputation: Emmaliu is an unknown quantity at this point 
Solved Threads: 0
Emmaliu Emmaliu is offline Offline
Newbie Poster

How to display a table on windows application in c#

 
0
  #1
Jan 11th, 2007
Hi everyone, I'm new here and I'm new to C# program.
I want to create a user name and passward verify windows application. I did some research, and finally get to connect to the database. Now I want to display the whole table which stores all the information. I know this does not help to verify the username and passward but help me to familiar with C# and database. Can anyone help me to point out the procedure or give me some hints? I will very very appreciate it.

Thanks.
Emma
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: How to display a table on windows application in c#

 
0
  #2
Jan 11th, 2007
Originally Posted by Emmaliu View Post
Hi everyone, I'm new here and I'm new to C# program.
I want to create a user name and passward verify windows application. I did some research, and finally get to connect to the database. Now I want to display the whole table which stores all the information. I know this does not help to verify the username and passward but help me to familiar with C# and database. Can anyone help me to point out the procedure or give me some hints? I will very very appreciate it.

Thanks.
Emma
When working with databases, ideally the best information you can get will be from a book which goes through it step by step.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 483
Reputation: campkev is an unknown quantity at this point 
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: How to display a table on windows application in c#

 
0
  #3
Jan 11th, 2007
what you probably want to use is a gridview (or datagrid, if your are not on 2.0) and bind it to the database
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 40
Reputation: amithasija is an unknown quantity at this point 
Solved Threads: 0
amithasija amithasija is offline Offline
Light Poster

Re: How to display a table on windows application in c#

 
0
  #4
Jan 20th, 2007
use datagridview ,which will definately solve ur problem


string sqlSelect = "select * from usertest";
SqlCommand cmd = new SqlCommand(sqlSelect, conn);
SqlDataAdapter adp = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
adp.Fill(dt);
dgView.DataSource = dt;
dgView.DataBind();

here is the code which will help u to bind the database values to the grid(dgview),
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 2
Reputation: Emmaliu is an unknown quantity at this point 
Solved Threads: 0
Emmaliu Emmaliu is offline Offline
Newbie Poster

Re: How to display a table on windows application in c#

 
0
  #5
Jan 21st, 2007
Thanks a lot.
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 759
Reputation: Killer_Typo will become famous soon enough Killer_Typo will become famous soon enough 
Solved Threads: 35
Killer_Typo's Avatar
Killer_Typo Killer_Typo is offline Offline
Master Poster

Re: How to display a table on windows application in c#

 
0
  #6
Jan 27th, 2007
Originally Posted by Emmaliu View Post
Thanks a lot.
hey i hope this helps you out some

http://www.daniweb.com/techtalkforums/thread62112.html

its a HOWTO i wrote that covers how to query a database and return all of the information in a particular table.
Dont forget to spread the reputation to those that deserve!
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 26
Reputation: kool.net is an unknown quantity at this point 
Solved Threads: 0
kool.net kool.net is offline Offline
Light Poster
 
-2
  #7
15 Days Ago
can i pass multiple quries to datagrid view, if yes then pls tell me how.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,903
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 273
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso
 
0
  #8
15 Days Ago
Hey kool.net, don't resurrect old threads. Post your question in a new thread, where if needed you can refer freely to old threads if you want to.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC