| | |
How to display a table on windows application in c#
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2007
Posts: 2
Reputation:
Solved Threads: 0
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
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
•
•
•
•
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
*Voted best profile in the world*
•
•
Join Date: Nov 2006
Posts: 40
Reputation:
Solved Threads: 0
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),
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),
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.
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!
![]() |
Similar Threads
- Capturing "Enter" key event in C# windows application (C#)
- to make checkboxes visible in datagrid C# windows application (C#)
- Displaying an Excel document in a windows application (C#)
Other Threads in the C# Forum
- Previous Thread: Hi, I dont get what Iv done wrong
- Next Thread: SMS Sender in C#.NET
| Thread Tools | Search this Thread |
.net access algorithm api array asp.net barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom database databaseconnection datagrid datagridview dataset datetime dbconnection degrees design development draganddrop drawing encryption enum eventhandlers excel file firefox form format forms function gdi+ grantorrevokepermissionthroughc#.net image index input install java label libraries list listbox loop mandelbrot marshalbyrefobject math mouseclick movingimage mysql netcfsvcutil.exe operator path photoshop php picturebox pixelinversion platform post programming radians regex remoting resourcefile richtextbox server sleep socket sql statistics stream string study system.servicemodel table tcpclientchannel text textbox thread time timer update usercontrol validation visualstudio webbrowser windows winforms wpf wpfc# xml






