TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sreekanth Reddy
354
4.8k
420.1k
connection oriented in windows forms
Oct 2 2013 2:55 AM
hai friends,
I am a learner...
I am comparing connection oriented in both win-forms & web-forms.
Here is my code...
Web-Forms
----------------------------------------------------------------------------------------------------------------------------
SqlConnection con = new SqlConnection("server=.;database=test;trusted_connection=true");
con.Open();
SqlCommand cmd = new SqlCommand("select * from employee",con);
SqlDataReader dr = cmd.ExecuteReader();
dataGridView1.DataSource = dr;
con.Close();
---------------------------------------------------------------------------------------------------------------------------
I got the output.
Win-Forms
--------------------------------------------------------------------------------------------------------------------------------
SqlConnection con = new SqlConnection("server=.;database=test;trusted_connection=true");
con.Open();
SqlCommand cmd = new SqlCommand("select * from employee",con);
SqlDataReader dr = cmd.ExecuteReader();
dataGridView1.DataSource = dr;
con.Close();
-----------------------------------------------------------------------------------------------------------------------------------
I dint get the output.
Why?
Please answer this.....................
Reply
Answers (
1
)
LogIn system in ADO.net
Gridview Textbox Validation?..